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

ASP的Server.MapPath()不同參數(shù)返回路徑總結(jié)

 更新時(shí)間:2014年07月23日 11:38:25   作者:明凱  
這篇文章主要介紹了ASP的Server.MapPath()不同參數(shù)返回路徑總結(jié),也就是在Server.MapPath()中填入絕對(duì)路徑、相對(duì)路徑等情況的返回值總結(jié),需要的朋友可以參考下

在使用Server.MapPath()的時(shí)候,有很多的參數(shù),什么絕對(duì)路徑啊,相對(duì)路徑啊,這些不復(fù)雜但是很容易弄混淆的東西,這里將他做一個(gè)整理。

復(fù)制代碼 代碼如下:

./當(dāng)前目錄
/網(wǎng)站主目錄
../上層目錄
~/網(wǎng)站虛擬目錄

如果當(dāng)前的網(wǎng)站目錄為E:\wwwroot
應(yīng)用程序虛擬目錄為E:\wwwroot\company
瀏覽的頁(yè)面路徑為E:\wwwroot\company\news\show.asp
在show.asp頁(yè)面中使用

復(fù)制代碼 代碼如下:

Server.MapPath(“./”) 返回路徑為:E:\wwwroot\company\news
Server.MapPath(“/”) 返回路徑為:E:\wwwroot
Server.MapPath(“../”) 返回路徑為:E:\wwwroot\company
Server.MapPath(“~/”) 返回路徑為:E:\wwwroot\company

server.MapPath(request.ServerVariables(“Path_Info”))
Request.ServerVariables(“Path_Translated”)
上面兩種方式返回路徑為 D:\wwwroot\company\news\show.asp

您可能感興趣的文章:

相關(guān)文章

最新評(píng)論