• <label id="pxtpz"><meter id="pxtpz"></meter></label>
      1. <span id="pxtpz"><optgroup id="pxtpz"></optgroup></span>

        當前位置:雨林木風下載站 > 技術開發教程 > 詳細頁面

        ASP文件設置--列出目錄及文件 

        ASP文件設置--列出目錄及文件 

        更新時間:2021-09-25 文章作者:未知 信息來源:網絡 閱讀次數:

        把以下文件建在同一目錄,IIS中確定文件操作組件可用,即可用ASP列出文件和目錄了,呵呵歡迎光臨我的主頁 http://skypavilion.yeah.net

        ----文件folder.inc-----
        <%
        folderini="c:\"
        %>


        ----文件index.asp-----
        <!--#Include file="folder.inc"-->
        <html>
        <head>
        <title>FileSearch</title>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        </head>

        <frameset rows="80,*" frameborder="1" border="1" framespacing="1" cols="*">
          <frame name="topFrame" scrolling="NO" src="up.asp" >
          <frame name="mainFrame" src="getinfo.asp?foldinfo=<%=folderini%>">
        </frameset>
        <noframes><body bgcolor="#FFFFFF">

        </body></noframes>
        </html>



        ----文件up.asp-----
        <!--#Include file="folder.inc"-->
        <html><title>Up</title>
        <head>
        <style type="text/css">
        <!--
        .ttl1_txt {  font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        .cnt_txt {  font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        A:link{color:#0000ff;text-decoration: none}
        A:visited {color:#0000ff;text-decoration: none}
        A:active {color:#33ccff;text-decoration: underline}
        A:hover {color:#33ccff;text-decoration: underline}
        body{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        Tr{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        TD{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt
        -->
        </style>

        </head>
        <table width="780" border="0" cellspacing="1" cellpadding="1">
          <tr align="center">
            <td align="center"><a href="getinfo.asp?foldinfo=<%=folderini%>" target="mainFrame">List All Folder/File Info</a>
            </td>
          </tr>
        </table>
        </html>



        ----文件getinfo.asp-----
        <!--#Include file="folder.inc"-->
        <%foldinfo=trim(Request.Querystring("foldinfo"))%>
        <html>
        <head>
        <title>GetInfo</title>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <style type="text/css">
        <!--
        .ttl1_txt {  font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        .cnt_txt {  font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        A:link{color:#0000ff;text-decoration: none}
        A:visited {color:#0000ff;text-decoration: none}
        A:active {color:#33ccff;text-decoration: underline}
        A:hover {color:#33ccff;text-decoration: underline}
        body{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        Tr{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        TD{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt
        -->
        </style>
        <Script Language="JavaScript">
        function fileinfo(filenamecode,filesize,lastmodify){
        //document.write(filenamecode);
        window.open("fileinfo.asp?filename="+filenamecode+"&filesize="+filesize+"&lastmodify="+lastmodify,"","height=200,width=450,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no");
        }
        </Script>
        </head>

        <body bgcolor="#FFFFFF" text="#000000">
        <table width="780" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="cnt_txt"> <font color="#000000">Current Folder:--</font><font color="#FF7120"><%=foldinfo%></font></td>
          </tr>
          <tr>
            <td>
              <hr size="1">
            </td>
          </tr>
          <tr>
            <td>
              <table width="780" border="0" cellspacing="1" cellpadding="1">
                <tr bgcolor="#00CC00">
                  <td width="300" class="cnt_txt">Folder Name:</td>
                  <td width="180" class="cnt_txt">Size:</td>
                  <td width="300" class="cnt_txt">LastModify:</td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td align="right" class="cnt_txt">
              <%
                    upfolder=left(foldinfo,len(foldinfo)-1)
                    upfolder=left(upfolder,InstrRev(upfolder, "\"))
                    if foldinfo<>folderini then
                response.write("<a href='getinfo.asp?foldinfo="&upfolder&"'>Parent Folder</a>")
                else
                response.write("Parent Folder")
                end if%>
            </td>
          </tr>
          <tr>
            <td class="cnt_txt">
              <% ShowFolderList(foldinfo) %>
            </td>
          </tr>
          <tr>
            <td class="cnt_txt">
              <table width="780" border="0" cellspacing="1" cellpadding="1">
                <tr bgcolor="#009999">
                  <td width="300">File Name:</td>
                  <td width="180">Size:</td>
                  <td width="300">LastModify:</td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="cnt_txt">
              <% showfolderinfo(foldinfo)%>
            </td>
          </tr>
          <tr>
            <td> </td>
          </tr>
        </table>

        <%
        Sub ShowFolderList(folderspec)
            Dim fs, f, f1, fc, s, schild,p,fsize
            Set fs = CreateObject("Scripting.FileSystemObject")
            Set f = fs.GetFolder(folderspec)
            Set fc = f.SubFolders
            For Each f1 in fc
                    s = f1.name
                    's = s &  vbCrLf
                p = f1.DateLastModified
                fsize = f1.Size
                    schild=folderspec&s&"\"

        Response.write("<table width='780' border='0' cellspacing='1' cellpadding='1'>")
        Response.write("<tr>")
        Response.write("<td width='300' bgcolor='#ECFFD9'><font face='Wingdings' font size='3pt'>0</font><a href='getinfo.asp?foldinfo="&schild&"'>"&s&"</a></td>")
        Response.write("<td width='180' bgcolor='#ECFFD9'>"&fsize&"</td>")
        Response.write("<td width='300' bgcolor='#ECFFD9'>"&p&"</td>")
        Response.write("</tr>")
        Response.write("</table>")

            Next
        End Sub

        Sub showfolderinfo(folderspc)
        set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")


        Set MyFolder=MyFileObject.GetFolder(folderspc)

        for each thing in MyFolder.Files
            'Response.write("<br>"&thing)
            '===============Get file information
            Set afile=MyFileObject.GetFile(thing)
            
            '==========filename correct code
            filenamecode=afile.name
            filedetail=folderspc+filenamecode
            filedetail=replace(filedetail,"\","*s_p_l_i_t*")
            filesize=afile.size
            lastmodify=afile.DateLastModified

        Response.write("<table width='780' border='0' cellspacing='1' cellpadding='1'>")
        Response.write("<tr>")
        Response.write("<td width='300' bgcolor='#f4f4ff'><font face='Wingdings' font size='3pt'><</font><a href="&chr(34)&"javascript:fileinfo('"&filedetail&"','"&filesize&"','"&lastmodify&"')"&chr(34)&">"&filenamecode&"</a></td>")
        Response.write("<td width='180' bgcolor='#f4f4ff'>"&filesize&"</td>")
        Response.write("<td width='300' bgcolor='#f4f4ff'>"&lastmodify&"</td>")
        Response.write("</tr>")
        Response.write("</table>")
        Next
        End sub
        %>
        </body>
        </html>


        ----文件fileinfo.asp-----
        <%
        filename=Request.QueryString("filename")
        filename=replace(filename,"*s_p_l_i_t*","\")
        filesize=Request.QueryString("filesize")
        lastmodify=Request.QueryString("lastmodify")
        %>
        <html>
        <head>
        <style type="text/css">
        <!--
        .ttl1_txt {  font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        .cnt_txt {  font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        A:link{color:#0000ff;text-decoration: none}
        A:visited {color:#0000ff;text-decoration: none}
        A:active {color:#33ccff;text-decoration: underline}
        A:hover {color:#33ccff;text-decoration: underline}
        body{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        Tr{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt}
        TD{font-family: "Verdana", "Arial", "Helvetica", "sans-serif"; font-size: 9pt
        -->
        </style>
        </head>
        <body>
        <%
        'Response.write filename&"<br>"&filesize&"<br>"&lastmodify
        %>
        <table width="400" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#00CC00" colspan="2">Current File Info:</td>
          </tr>
          <tr valign="top">
            <td width="110">File Location:</td>
            <td width="290"><font color="#990000"><font face='Wingdings' font size='3pt'><</font><b> <%=filename%></b></font></td>
          </tr>
          <tr>
            <td colspan="2">
              <hr size="1">
            </td>
          </tr>
          <tr valign="top">
            <td height="11">File Size: </td>
            <td height="11"><%=filesize%> bytes</td>
          </tr>
          <tr>
            <td colspan="2">
              <hr size="1">
            </td>
          </tr>
          <tr valign="top">
            <td>LastModify: </td>
            <td><%=lastmodify%></td>
          </tr>
          <tr>
            <td colspan="2">
              <hr size="1">
            </td>
          </tr>
          <tr>
            <td height="18" colspan="2">
              <p>Please Use appropriate Application to Open this File.</p>
            </td>
          </tr>
          <tr>
            <td height="13" align="right" colspan="2"><a href="javascript:this.window.close()">Close
              Window</a></td>
          </tr>
        </table>
        </body>
        </html>




        溫馨提示:喜歡本站的話,請收藏一下本站!

        本類教程下載

        系統下載排行

        主站蜘蛛池模板: 波多野结衣一区二区免费视频| 无码免费一区二区三区免费播放 | 亚洲综合激情九月婷婷 | 一级一级一级毛片免费毛片| 日本一道在线日本一道高清不卡免费| 精品丝袜国产自在线拍亚洲| 97碰公开在线观看免费视频| 亚洲丝袜中文字幕| 女人18毛片a级毛片免费| 蜜桃AV无码免费看永久| 曰皮全部过程视频免费国产30分钟 | 黄视频在线观看免费| 无码中文字幕av免费放| 亚洲国产精品无码成人片久久| 我要看免费的毛片| 亚洲综合精品一二三区在线| 亚洲欧洲免费视频| 亚洲熟女综合一区二区三区 | 久久亚洲精品无码观看不卡| a级毛片高清免费视频| 久久久久亚洲AV片无码下载蜜桃| 亚洲无砖砖区免费| 亚洲精品无码久久久久YW| 免费一区二区视频| 精品在线免费观看| 亚洲久悠悠色悠在线播放| 成人亚洲网站www在线观看| 中文字幕免费在线观看动作大片| 久久精品国产亚洲av麻豆色欲| 99久久免费国产精品特黄| 疯狂做受xxxx高潮视频免费| 在线看片免费不卡人成视频| 激情无码亚洲一区二区三区| 国产亚洲福利精品一区| 国产一卡二卡3卡四卡免费| 看免费毛片天天看| 亚洲五月六月丁香激情| 国产小视频免费观看| 日本免费一区二区三区四区五六区| 水蜜桃亚洲一二三四在线| 成人毛片免费观看|