| 发表于:2007-01-07 21:03:552楼 得分:0 |
下载的话自己另外写个http头 用fso实现遍历的代码 希望对你有用 <%@ language = vbscript %> <%server.scripttimeout=5000%> <html> <head> <title> files </title> <link rel= "stylesheet " type= "text/css " href= "ase.css "> </head> <body topmargin=0> <% thisdir=request( "spath ") if thisdir= " " then thisdir= ". " end if set fs=server.createobject( "scripting.filesystemobject ") set fdir=fs.getfolder(thisdir) response.write " <table width= '100% ' cellpadding= '2 ' cellspacing= '2 '> " response.write " <tr> <td> </td> <td bgcolor= '#cccccc '> 名称 </td> <td bgcolor= '#cccccc '> 大小 </td> <td bgcolor= '#cccccc '> 类型 </td> <td bgcolor= '#cccccc '> 修改时间 </td> </tr> " 'response.write "目录列表: <br> " for each thing in fdir.subfolders response.write " <tr> <td> </td> <td colspan= '4 '> <img src= 'images/folder.gif '> <a href= 'files.asp?spath= " & thisdir & "\ " & thing.name & " '> " & thing.name & " </a> </td> </tr> " next 'response.write "文件列表: <br> " dim strext for each thing in fdir.files response.write " <tr> <td> " 'checkbox for select response.write " <input type= 'checkbox ' name= ' "&thing.name& " '> </td> " 'file name strext=lcase(right(thing.name,4)) select case strext case ".htm " response.write " <td> <img src= 'images/html.gif '> " & thing.name & " <a href= 'edit.asp?filename= "&thisdir& "/ "&thing.name& "&task=read '> <img src= 'images/edit.gif ' width=16 height=16 border=0 alt= '编辑 '> </a> </td> " case "html " response.write " <td> <img src= 'images/html.gif '> " & thing.name & " <a href= 'edit.asp?filename= "&thisdir& "/ "&thing.name& "&task=read '> <img src= 'images/edit.gif ' width=16 height=16 border=0 alt= '编辑 '> </a> </td> " case ".asp " response.write " <td> <img src= 'images/asp.gif '> " & thing.name & " <a href= 'edit.asp?filename= "&thisdir& "/ "&thing.name& "&task=read '> <img src= 'images/edit.gif ' width=16 height=16 border=0 alt= '编辑 '> </a> </td> " case ".cgi " response.write " <td> <img src= 'images/perl.gif '> " & thing.name & " <a href= 'edit.asp?filename= "&thisdir& "/ "&thing.name& "&task=read '> <img src= 'images/edit.gif ' width=16 height=16 border=0 alt= '编辑 '> </a> </td> " case ".txt " response.write " <td> <img src= 'images/txt.gif '> " & thing.name & " <a href= 'edit.asp?filename= "&thisdir& "/ "&thing.name& "&task=read '> <img src= 'images/edit.gif ' width=16 height=16 border=0 alt= '编辑 '> </a> </td> " case ".gif " response.write " <td> <img src= 'images/gif.gif '> " & thing.name & " </td> " case ".jpg " response.write " <td> <img src= 'images/jpg.gif '> " & thing.name & " </td> " case ".zip " response.write " <td> <img src= 'images/zip.gif '> " & thing.name & " </td> " case ".exe " response.write " <td> <img src= 'images/exe.gif '> " & thing.name & " <a href= 'fileop.asp?filename= "&thisdir& "/ "&thing.name& "&action=EXECute '> <img src= 'images/EXECute.gif ' width=16 height=16 border=0 alt= '执行 '> </a> </td> " case else if right(thing.name,3)= ".pl " then response.write " <td> <img src= 'images/perl.gif '> " & thing.name & " <a href= 'edit.asp?filename= "&thisdir& "/ "&thing.name& "&task=read '> <img src= 'images/edit.gif ' width=16 height=16 border=0 alt= '编辑 '> </a> " else response.write " <td> <img src= 'images/unknown.gif '> " & thing.name & " </td> " end if end select 'file properties response.write " <td> " & cstr(thing.size) & " </td> <td> " & thing.type & " </td> <td> " & cstr(thing.datelastmodified) & " </td> </tr> " next response.write " </table> " %> </body> </html> | | |
|