您现在的位置是:网站首页> 编程资料编程资料
asp中将相对路径转换为绝对路径的函数代码_应用技巧_
2023-05-25
209人已围观
简介 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
您可能感兴趣的文章:
相关内容
- asp统计信息实现代码/文章每日、每周、每月、总访问量的方法_应用技巧_
- ASP中用ajax方式获得session的实现代码_应用技巧_
- 独立图片服务器的图片上传的解决方式_应用技巧_
- VBScript ASP CDbl() 函数转换为双精度类型_应用技巧_
- ASP关于编码的几个有用的函数小结(utf8)_应用技巧_
- asp Fix、Int、Round、CInt函数使用说明_ASP基础_
- js 不用重复检测浏览器提高效率_应用技巧_
- asp文本框换行显示代码_应用技巧_
- ASP FSO文件操作函数代码(复制文件、重命名文件、删除文件、替换字符串)_应用技巧_
- ASP页面静态化批量生成代码分享(多种方法)_应用技巧_
