Skip to content
C#代码
FileStream fs = new FileStream(Server.MapPath(“config.txt”), FileMode.Create);
string url = “outfile=” + outfile + “&outpath=” + outpath;
//获得字节数组,用GB2312方式写配置文件,以便与flash兼容
byte[] data =System.Text.Encoding.GetEncoding(“gb2312”).GetBytes(url);
//开始写入
fs.Write(data, 0, data.Length);
//清空缓冲区、关闭流
fs.Flush();
fs.Close();
fs =null;