[ASP]动态include文件函数
‘获取文件名中的文件夹地址
Function getFolder(ByVal a_sPath)
Dim sPath : sPath = Trim(a_sPath)
Dim iPos
getFolder = NULL
If isNone(sPath) Then Exit Function End If
sPath = Replace(sPath, “/”, “\”)
If Right(sPath,1)=”\” Then sPath = Left(sPath, Len(sPath)-1) End If
iPos = InstrRev(sPath, “\”)
If iPos>0 Then sPath = Mid(sPath, 1, iPos) End If
getFolder = sPath
End Function
‘获取绝对路径
‘a_sFromPath:被参照的绝对路径,注意此路径必须存在,函数中不作检测
‘a_sToPath:相对路径
Function getPath(ByVal a_sFromPath, […]
