无为清净楼资源网 Design By www.qnjia.com
页面后台cs文件的相对网站根目录的路径/view/Atlas
复制代码 代码如下:
string rootPath1= Server.MapPath("~");
string rootPath2 = Request.ApplicationPath;
string path1 = Server.MapPath("upload");
string path2 = Server.MapPath("");
string path3 = Server.MapPath(".");
string path4 = Server.MapPath("..");
string path5 = Server.MapPath(Request.ServerVariables["PATH_INFO"]);

结果
复制代码 代码如下:
string rootpath1= "F:\\ASP.NET_Projects\\超凡装饰\\cfzs\\Web\\cfzs\\Web";
string rootpath2= "/Web";
string path1 = "F:\\ASP.NET_Projects\\超凡装饰\\cfzs\\Web\\view\\Atlas\\upload\\cfzs\\Web\\view\\Atlas\\upload";
string path2 = "F:\\ASP.NET_Projects\\超凡装饰\\cfzs\\Web\\view\\Atlas\\cfzs\\Web\\view\\Atlas";
string path3 = "F:\\ASP.NET_Projects\\超凡装饰\\cfzs\\Web\\view\\Atlas\\cfzs\\Web\\view\\Atlas";
string path4 = "F:\\ASP.NET_Projects\\超凡装饰\\cfzs\\Web\\view\\cfzs\\Web\\view";
string path5 = "F:\\ASP.NET_Projects\\超凡装饰\\cfzs\\Web\\view\\Atlas\\Add.aspx\\cfzs\\Web\\view\\Atlas\\Add.aspx";
标签:
网站目录,物理路径

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com