| Next Set FileObject = Nothing If Err.Number <> 0 Then CreateDIR = False Err.Clear Else CreateDIR = True End If End Function function GetfileExt(byval filename) fileExt_a=split(filename,".") GetfileExt=lcase(fileExt_a(ubound(fileExt_a))) end function function getvirtual(str,path,urlhead) if left(str,7)="http://" then url=str elseif left(str,1)="/" then start=instrRev(str,"/") if start=1 then url="/" else url=left(str,start) end if url=urlhead&url elseif left(str,3)="../" then str1=mid(str,inStrRev(str,"../")+2) ar=split(str,"../") lv=ubound(ar)+1 ar=split(path,"/") url="/" for i=1 to (ubound(ar)-lv) url=url&ar(i) next url=url&str1 url=urlhead&url else url=urlhead&str end if getvirtual=url end function '示例代码 dim dlpath virtual="/downweb/" truepath=server.MapPath(virtual) |