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());

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案