YKT_Common/Utility.cs
(完整代码) 854Busing System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Web;
namespace YKT_Common
{
public class Utility
{
public static void Log(string content)
{
string path = string.Empty;
HttpContext context = HttpContext.Current;
if (context != null)
{
path = context.Server.MapPath("~/Temp/log.txt");
}
else
{
path = Path.Combine(AppDomain .CurrentDomain .BaseDirectory ,"Temp/log.txt");
}
FileStream fs = new FileStream(path ,FileMode.Append ,FileAccess .Write );
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(content );
sw.Flush();
sw.Close();
fs.Close();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。