• λ我爱Aspx >> Asp.Net >> 用ASP编写下载网页中所有资源的程序
  • 用ASP编写下载网页中所有资源的程序

  • :aspxer  Դ:internet  :2007-5-15 20:47:26  ؼ:asp
  • path_level = UBound(patharr)

    For I = 0 To path_level

    If I = 0 Then pathtmp = patharr(0) & "/" Else pathtmp = pathtmp & patharr(I) & "/"

    cpath = Left(pathtmp, Len(pathtmp) - 1)

    If Not FileObject.FolderExists(cpath) Then FileObject.CreateFolder cpath

    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)

    if request("url")<> "" then

    url=request("url")

    Ҷƪл˵?
  • һƪ用ASP编程实现网络内容快速查找
    һƪASP程序性能测试报告