绿色资源网

电脑版
提示:原网页已由神马搜索转码, 内容由www.downcc.com提供.
您的位置:首页网络编程Asp编程→ asp中将相对路径转换为绝对路径的函数

asp中将相对路径转换为绝对路径的函数

我要评论2011/05/28 21:01:20 来源:绿色资源网编辑:downcc.com 评论:0点击:345次

'================================================
' 函数名: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

相关阅读

阅读本文后您有什么感想? 已有 人给出评价!

  • 1

  • 1

  • 1

  • 1

  • 1

  • 1

用户评论

热门评论

最新评论

发表评论查看所有评论(0)

昵称:
请不要评论无意义或脏话,我们所有评论会有人工审核.
字数: 0/500(您的评论需要经过审核才能显示)

相关软件

热点图文

    更多+

    精品软件