欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp.net獲取網(wǎng)站目錄物理路徑示例

 更新時(shí)間:2014年02月12日 11:08:25   作者:  
這篇文章主要介紹了asp.net獲取網(wǎng)站目錄物理路徑的方法,需要的朋友可以參考下
頁(yè)面后臺(tái)cs文件的相對(duì)網(wǎng)站根目錄的路徑/view/Atlas
復(fù)制代碼 代碼如下:

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"]);

結(jié)果
復(fù)制代碼 代碼如下:

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";

相關(guān)文章

最新評(píng)論