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

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

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

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

復制代碼 代碼如下:

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

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

復制代碼 代碼如下:

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

您可能感興趣的文章:

相關文章

最新評論