An asp function that converts absolute paths to relative paths. Friends who need it can save it. Copy the code code as follows:
'================================================
'Function name: ChkMapPath
' Function: Convert relative path to absolute path
'Parameter: strPath ---- original path
'Return value: absolute path
'================================================
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