using System.IO;
using System.Text;
string return_msg=""; //错误信息
WriteFile(Server.MapPath("") + "\\Log.txt", return_msg);
public static void WriteFile(string pathWrite, string content)
{
if (File.Exists(pathWrite))
{
//File.Delete(pathWrite);
}
File.AppendAllText(pathWrite, content + "\r\n----------------------------------------\r\n",
Encoding.GetEncoding("utf-8"));
}