摘要:
从网上下载的破解版的hishop中的源码扒出来的,觉得不错,先记下来,以后做项目异常BUG记录都用这个。。 下面是使用流程: 1. VS中用NUGET搜索log4net,安装 2. 项目的工具类库Util中建一Log类,代码如下: using log4net;using System;using S 阅读全文
摘要:
同样也是在破解版的HISHOP源码上扒出来的,代码如下: protected void InitVisitorTerminal() { VisitorTerminal visitorTerminal = new VisitorTerminal(); string userAgent = base.R 阅读全文
摘要:
在Webapi中是用不了server.mappath方法的,上网搜索了一下,发现是用如下代码取得文件绝对路径: string logpath = System.Web.Hosting.HostingEnvironment.MapPath($"/Log/{DateTime.Now.ToString(" 阅读全文