摘要:
需要using System.IO 命名空间从文本文件中读取内容:public string readtxts(string path){StreamReader sr=new StreamReader(Server.MapPath(path),System.Text.Encoding.Default);string input =sr.ReadToEnd();return input;}调用方法:string path = "10.txt";//文件名称Response.Write(readtxts(path));拷贝文件:string paths = HttpConte 阅读全文