asp中將相對路徑轉(zhuǎn)換為絕對路徑的函數(shù)代碼
更新時間:2011年05月27日 00:49:18 作者:
一個將絕對路徑轉(zhuǎn)換為相對路徑的asp函數(shù),需要的朋友可以收藏下。
復(fù)制代碼 代碼如下:
'================================================
' 函數(shù)名:ChkMapPath
' 作 用:相對路徑轉(zhuǎn)換為絕對路徑
' 參 數(shù):strPath ----原路徑
' 返回值:絕對路徑
'================================================
Function ChkMapPath(ByVal strPath)
Dim fullPath
strPath = Replace(Replace(Trim(strPath), "/", "\"), "\\", "\")
If strPath = "" Then strPath = "."
If InStr(strPath,":\") = 0 Then
fullPath = Server.MapPath(strPath)
Else
strPath = Replace(strPath,"..\","")
fullPath = Trim(strPath)
If Right(fullPath, 1) = "\" Then
fullPath = Left(fullPath, Len(fullPath) - 1)
End If
End If
ChkMapPath = fullPath
End Function
相關(guān)文章
ReplaceTrim 函數(shù)之a(chǎn)sp實現(xiàn)過濾掉字符中所有的tab和回車和換行的代碼
ReplaceTrim 函數(shù)之a(chǎn)sp實現(xiàn)過濾掉字符中所有的tab和回車和換行的代碼...2007-09-09Asp實現(xiàn)的數(shù)據(jù)庫連接池功能函數(shù)分享
這篇文章主要介紹了Asp實現(xiàn)的數(shù)據(jù)庫連接池功能函數(shù)分享,本函數(shù)能夠加快網(wǎng)頁的訪問速度,降低數(shù)據(jù)庫的壓力,需要的朋友可以參考下2014-07-07ASP 環(huán)境下 VBS 事件應(yīng)用 示例代碼
ASP 環(huán)境下 VBS 事件應(yīng)用 示例代碼...2007-03-03