C# 存储日志
程序员文章站
2023-08-25 13:01:40
存储日志 public void log(string neirong) { var path = @"D:\xx文件名xx\Log\" + "日志" + ".log"; using (StreamWriter st = new StreamWriter(path, append: true)) { ......
存储日志
public void log(string neirong) { var path = @"d:\xx文件名xx\log\" + "日志" + ".log"; using (streamwriter st = new streamwriter(path, append: true)) { st.writeline( " " + datetime.now + " " + neirong); } }
下一篇: php实现session共享的实例方法