FileStream file = new FileStream(@"D:\uploads\data\1.php", FileMode.OpenOrCreate, FileAccess.ReadWrite);
// Encoding c= EncodingType.GetType(file);
StreamReader sd = new StreamReader(file, Encoding.GetEncoding("gb2312")); string str = sd.ReadToEnd();
str = str.Replace("Application=true", "Application=false");
sd.Close();
file.Close(); FileStream fs = File.Create(@"D:\uploads\data\1.php");
StreamWriter sw = new StreamWriter(fs);
sw.Write(str);
sw.Flush();
sw.Close();
fs.Close();
读php文件中文乱码,应该怎么解决
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货