newasp中main类(63)
End Function
'-- 修正文件路径
Public Function CheckPath(ByVal sPath)
sPath = Trim(sPath)
If Right(sPath, 1) <> "\" And sPath <> "" Then
sPath = sPath & "\"
End If
CheckPath = sPath
End Function
'-- 生成目录
Public Function CreatPathEx(ByVal sPath)
sPath = Replace(sPath, "/", "\")
sPath = Replace(sPath, "\\", "\")
On Error Resume Next
Dim strHostPath,strPath
Dim sPathItem,sTempPath
Dim i,fso
Set fso = Server.CreateObject(FSO_ScriptName)
strHostPath = Server.MapPath("/")
If InStr(sPath, ":") = 0 Then sPath = Server.MapPath(sPath)
If fso.FolderExists(sPath) Or Len(sPath) < 3 Then
CreatPathEx = True
Exit Function
End If
strPath = Replace(sPath, strHostPath, vbNullString,1,-1,1)
sPathItem = Split(strPath, "\")
If InStr(LCase(sPath), LCase(strHostPath)) = 0 Then
sTempPath = sPathItem(0)
Else
sTempPath = strHostPath
End If
For i = 1 To UBound(sPathItem)
If sPathItem(i) <> "" Then
内容版权声明:除非注明,否则皆为本站原创文章。