标签:har stream pat json gb2312 server file 文件 amr
创建web项目:
string Json = string.Empty;
string filePath = Server.MapPath("/***.json");//根目录下的文件
using (FileStream fs = new FileStream(filePath, FileMode.Open, System.IO.FileAccess.Read, FileShare.ReadWrite))
{
using (StreamReader sr = new StreamReader(fs, Encoding.GetEncoding("gb2312")))
{
Json = sr.ReadToEnd().ToString();
}
}
标签:har stream pat json gb2312 server file 文件 amr
原文地址:https://www.cnblogs.com/HenryWEI/p/9803265.html