专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > ASP

高分求:思想方法,最好有例子!解决办法

发布时间:2010-05-20 14:01:29 文章来源:www.iduyao.cn 采编人员:星星草
高分求:思想方法,最好有例子!

不想通过数据库实现以下功能,因所有文件将通过FTP直接上传。  


A:对根目录所有文件夹进行列表,而且可以进行分页。

B:能读取子目录所有文件名字,并进行分页,点击进行下载。

C:能实现大类,小类,搜索。

如大类:为根目录名称,子目录名称。最后可以搜索文件名。


------解决方案--------------------
下载的话自己另外写个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> &nbsp; </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> &nbsp; </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> "
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

  • ASP怎么隐藏表单

    ASP如何隐藏表单 <%if Cookies_Toy ="" then response.write "<a href='login.asp'>登录</a> <a href='reg.asp'>注册</a>" ...

  • 为何js调用css脚本后没效果

    为什么js调用css脚本后没效果 这个是css的脚本代码: body,ul,li{margin: 0; padding: 0; border: 0;} body {background: #f5f...

  • 怎么伪造post请求,求指点。

    如何伪造post请求,求指点。。。 要查询大批(也就几万个)运单的状态,那查询网站一次最多查24个,这一个个搞会搞死人的。。 有...

  • Asp.net_简略代码设置GridView自适应列宽不变形

    Asp.net_简单代码设置GridView自适应列宽不变形 动态绑定的GridView由于列数不固定,而列又太多(博主做的这个项目有150个左右的字段...

  • ASP.NET上实现AJAX注册提醒

    ASP.NET下实现AJAX注册提醒 Ajax全称是,主要是利用JavaScript实现异步的数据传输,首先说异步,异步是当前操作进行的时候,用...

  • aspnet_regiis装配出错:0x80070005 拒绝访问

    aspnet_regiis安装出错:0x80070005 拒绝访问 点击右边红色标题查看本文完整版:aspnet_regiis安装出错:0x80070005 拒绝访问安装...

  • 关于网站边框解决方法

    关于网站边框 像hao123这样的网站上的边框是着么弄的?背景图片吗?http://www.hao123.com 另外哪个素材网站有实用的这内素材 -----...

  • ! 多表分组查询统计

    求助!! 多表分组查询统计 高手们,帮帮忙! 用户表 D_user 为 ID Username GroupID 1 张三 2 2 李四 2 3 王五 ...

  • 在Paypal交付的同时,把表单的数据提交给数据库

    在Paypal提交的同时,把表单的数据提交给数据库 本帖最后由 liuyang2708 于 2012-11-20 23:14:54 编辑 在提交这个支付...

  • 虚拟目录上JavaScript不能正常执行

    虚拟目录下JavaScript不能正常执行 各位大侠好,我在同一台服务器上用两种方式部署同一个网站。 第一种方法:在IIS下直接建一个网站...

热门推荐: