C# 单行读取文本文件
C# 单行读取文本文件
string strPath = HttpContext.Server.MapPath("/App_Data/fun.db").ToString();
if (!System.IO.File.Exists(strPath)) return AjaxResult("error", "权限文件丢失!" + strPath);
}
System.IO.StreamReader sr = new System.IO.StreamReader(strPath, System.Text.Encoding.GetEncoding("utf-8"));
while (sr.Peek() > 0) string[] arrCurrRowValue = sr.ReadLine().Trim().Split(';');
}