首页 > 运营 > 帮助中心 > 正文

Global.asax取物理路径/取绝对路径具体方法

2020-07-28 13:57:53
字体:
来源:转载
供稿:网友

虚拟路径
复制代码 代码如下:
Server.MapPath("~/") 取得的就是虚拟路径

取绝对路径
复制代码 代码如下:
string absolutelyPath =AppDomain.CurrentDomain.BaseDirectory;

取物理路径和应用程序路径

复制代码 代码如下:
System.Web.HttpContext.Current.Request.ApplicationPath

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表