using System.Text;
using System.IO;
string path = "UploadFiles/mm.txt";
StringBuilder str = new StringBuilder();
string line;
//using (StreamReader sr = File.OpenText(Server.MapPath(path)))
using(StreamReader sr = new StreamReader(Server.MapPath(path),System.Text.Encoding.Default))
{
while ((line = sr.ReadLine()) != null)
{
str.Append(line);
str.Append("<br>");//产生换行效果
}
}
Response.Write(str.ToString());