您现在的位置是:网站首页> 编程资料编程资料
asp中将相对路径转换为绝对路径的函数_资源网
2022-05-05
963人已围观
简介 asp中将相对路径转换为绝对路径的函数_资源网
'================================================
' 函数名:ChkMapPath
' 作 用:相对路径转换为绝对路径
' 参 数: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
相关内容
- 对象不支持此属性或方法: 'Response.CharSet'_资源网
- IIS处理Asp.net请求和 Asp.net页面生命周期_资源网
- ASP.NET生成eurl.axd Http异常错误处理方法_资源网
- 用JavaScript和PHP检测Android设备方法_资源网
- php删除文件夹及其文件夹下所有文件_资源网
- PHP空白页面常见原因及解决方法_资源网
- header location重定向语句对页面进行跳转失败的原因_资源网
- asp 验证输入网址是否有效并可以访问 与正则验证输入_资源网
- FormatNumber函数_资源网
- Request.ServerVariables 参数大全_资源网
