当前位置:主页 > 软件编程 > .NET代码 >
时间:2021-01-21 10:52:04 | 栏目:.NET代码 | 点击:次
方法一:
string sPath = System.IO.Path.GetDirectoryName(Page.Request.PhysicalPath)
方法二:
string sPath = System.Web.HttpContext.Current.Request.MapPath("/")
方法三: string sPath = Page.Server.MapPath("/");
我推荐使用第二种