当前位置: 代码迷 >> vbScript >> ASP选择文件夹解决方案
  详细解决方案

ASP选择文件夹解决方案

热度:560   发布时间:2013-02-26 00:00:00.0
ASP选择文件夹
在做一个ASP程序。需要用浏览方式选择一个文件夹,就象浏览选择文件一样。查询了半天,根本没有解决办法。哪位天才能够解决这个难题?

------解决方案--------------------------------------------------------
参考http://topic.csdn.net/u/20090625/17/a54f3f19-f8c9-4466-addb-2cec83869fb0
<% 
response.write " <table> <tr>" 
Dim path,fso,objFolder,file,foldFiles 
url = Request.ServerVariables("SERVER_NAME")
paths="temp"'图片文件所在的文件夹 
path=server.MapPath(paths) 
Set fso=Server.CreateObject("Scripting.FileSystemObject") 
Set objFolder = fso.GetFolder(path) 
Set foldFiles = objFolder.files 
i=1 
For Each file In foldFiles 
temp=split(file,"\") 
files=temp(ubound(temp)) 
urls="http:/" &"/" &url &"/" &paths & "/" & files 
response.write " <td> <a href='"&urls&"'> <img src='"&urls&"' width='100' /> </td>" 
if i mod 5 = 0 then response.write " </tr> <tr>" 
i=i+1 
Next 
Set objFolder=nothing 
Set objSubFolders=nothing 
Set foldFiles=nothing 
Set fso=nothing 
response.write " </table>" 
%>
------解决方案--------------------------------------------------------
asp遍历站点某文件夹以及子文件夹的文件
http://www.myziy.com/show.php?contentid=152
------解决方案--------------------------------------------------------
ASP实现浏览文件夹得功能,类似在我的电脑中访问一个文件夹:
http://www.myziy.com/show.php?contentid=176
  相关解决方案