• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    類似于iis瀏覽的功能

    發布: 2007-7-14 19:37 | 作者: 佚名    | 來源: 網絡轉載     | 查看: 23次 | 進入軟件測試論壇討論

    領測軟件測試網 <!---將此文件存為folder_list.asp看看效果就知道了加上權限就可以方便自己了,--->
    <%
    'const_domain_name為域名最后不要加斜杠
    const const_domain_name="http://localhost"
    %>
    <style>
    b,img,a{font-size:9pt;line-height:150%;text-decoration:none;color:#0000cc;}
    span{font-size:12pt;}
    </style>

    <%
    '------------------------------------------------顯示當前目錄下的子目錄和文件
    sub list
    Dim fso, f, f1, fc, s
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder(server.MapPath("."))
    set fs=f.SubFolders
    Set fc =f.Files

    For Each fss in fs
    dim folder_name
    folder_name=fss.name
    %>
    <a href="folder_list.asp?act=list_cur&cur_path=<%=fss%>"><span style="font-family:wingdings">0</span><%=folder_name%></a><br>
    <%
    Next

    %>
    <%
    For Each f1 in fc
    dim filename
    filename=f1.name
    %>
    <a href="<%=p2v_path(f1)%>"><span style="font-family:wingdings 2">/</span><%=filename%></a><br>
    <%
    Next

    set fso=nothing
    end sub
    %>


    <%
    '------------------------------------------------顯示指定路徑下的目錄和文件
    sub list_cur
    Dim fso, f, f1, fc, s
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder(request("cur_path"))
    set fs=f.SubFolders
    Set fc =f.Files

    For Each fss in fs
    dim folder_name
    folder_name=fss.name
    %>
    <a href="folder_list.asp?act=list_cur&cur_path=<%=fss%>"><span style="font-family:wingdings">0</span><%=folder_name%></a><br>
    <%
    Next

    %>


    <%
    For Each f1 in fc
    dim filename
    filename=f1.name
    %>
    <a href="<%=p2v_path(f1)%>"><span style="font-family:wingdings 2">/</span><%=filename%></a><br>
    <%
    Next
    set fso=nothing
    end sub
    %>



    <%
    '------------------------------------------------顯示上級目錄的子目錄和子文件
    sub list_parent
    on error resume next
    Dim fso, f, f1, fc, s
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFolder(display_cur_path)
    set fs=f.SubFolders
    Set fc =f.Files

    For Each fss in fs
    dim folder_name
    folder_name=fss.name

    %>
    <a href="folder_list.asp?act=list_cur&cur_path=<%=fss%>"><span style="font-family:wingdings">0</span><%=folder_name%></a><br>
    <%

    Next

    %>

    <%
    For Each f1 in fc
    dim filename
    filename=f1.name
    %>
    <a href="<%=p2v_path(f1)%>"><span style="font-family:wingdings 2">/</span><%=filename%></a><br>
    <%
    Next
    set fso=nothing
    on error goto 0
    end sub

    '---------------------------------------------得到上級目錄的路徑
    function get_parent_folder()
    on error resume next
    str=display_cur_path
    str_find="\"
    str_int=InStrRev (str,str_find)-1 '得到上一級目錄的路徑
    get_parent_folder=mid(str,1,str_int)
    err.clear
    end function


    '-----------------------------------------------將文件路徑轉為www發布的路徑這樣就可以下載了
    function p2v_path(p_path)
    'p_path為硬盤上的物理路徑
    dim host
    host=lcase(server.MapPath("\"))
    p_path=lcase(p_path)
    p2v_path=replace(p_path,host,const_domain_name)
    end function

    '-----------------------------------------------顯示當前所在的路徑
    function display_cur_path()
    cur_path=request("cur_path")
    if cur_path="" then
    display_cur_path=server.MapPath(".")
    else
    display_cur_path=cur_path
    end if
    set fso=nothing
    end function

    sub main
    %>
    <a href="folder_list.asp?act=list_parent&cur_path=<%=get_parent_folder%>">向上</a> <b><a href="javascript:void(null)"><%=display_cur_path%></a></B><p>
    <%

    select case request("act")
    case "list_parent"
    list_parent
    case "list_cur"
    list_cur
    case else
    list
    end select
    end sub


    main
    %>


    延伸閱讀

    文章來源于領測軟件測試網 http://www.kjueaiud.com/


    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備10010545號-5
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>