语言:c#
平台:web
代码:现在的代码
StreamReader sr = new StreamReader(@"D:\work\web\CEN\UserWeb\kialison\index.html", System.Text.Encoding.Default);
string asdasd =sr.ToString().Replace("$公司名称$", "日本有限公司");
sr.Close(); System.IO.File.WriteAllText(@"D:\work\web\CEN\UserWeb\kialison\index1.html",asdasd, System.Text.Encoding.Default); //生成htm文件地址
问题:我要打开index.html 替换里面“$公司名称$”成“日本有限公司”然后保存成index1.html现在这样写保存出来的是System.IO.StreamReader这个内容, 请问哪里错了,应该怎么写 谢谢各位
平台:web
代码:现在的代码
StreamReader sr = new StreamReader(@"D:\work\web\CEN\UserWeb\kialison\index.html", System.Text.Encoding.Default);
string asdasd =sr.ToString().Replace("$公司名称$", "日本有限公司");
sr.Close(); System.IO.File.WriteAllText(@"D:\work\web\CEN\UserWeb\kialison\index1.html",asdasd, System.Text.Encoding.Default); //生成htm文件地址
问题:我要打开index.html 替换里面“$公司名称$”成“日本有限公司”然后保存成index1.html现在这样写保存出来的是System.IO.StreamReader这个内容, 请问哪里错了,应该怎么写 谢谢各位
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货