public static string writtxt(string html, string file) { FileStream fileStream = new FileStream(Environment.CurrentDirectory + "\\" + file, FileMode.Append); StreamWriter streamWriter = new StreamWriter(fileStream, Encoding.Default); streamWriter.Write(html + "\r\n"); streamWriter.Flush(); streamWriter.Close(); fileStream.Close(); return "ture"; }
原文:http://www.cnblogs.com/testsec/p/6095587.html