也許比較簡單的問題﹗﹗﹗請大蝦指教﹗

sansaolu 2004-11-17 03:48:36
本人想做一網頁﹕左邊可以顯示目前本機上某一指定目錄下所有文件夾﹐如﹕

Test ----a
|----b _______D...
|----c----|______E...

請問如何作這個Tree ???

謝謝


...全文
77 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
sansaolu 2004-11-17
  • 打赏
  • 举报
回复
謝謝 ygjwjj(塔克拉玛干---胡杨林)
Starfiremingming 2004-11-17
  • 打赏
  • 举报
回复
麻烦大家一下,再ASP中怎么引用对象库ADODB啊?
我的数据库连接总是失败啊,怎么回事呢?
能把详细的操作告诉我么?
ygjwjj 2004-11-17
  • 打赏
  • 举报
回复
Dim fso,f,ctf, AllInfo,StandInfo,Folderspec,fc

Set fso = CreateObject("Scripting.FileSystemObject") '这就是


Folderspec="D:\gwbz\cns\"
Set f = fso.GetFolder(Folderspec)
Set fc = f.Files

Set ctf1 = fso.CreateTextFile("d:\456.txt",True)

For Each f1 in fc
filename=f1.name

Set ctf = fso.OpenTextFile("D:\gwbz\cns\"&filename,,true)

On Error Resume Next
AllInfospace =ctf.Readall

StandInfo=stripHTML(AllInfospace)
'response.Write StandInfo

StanInfo=GetBzNum(AllInfospace)&" |"&GetBzTitle(StandInfo)&" |"&GetBzywmc(AllInfospace)&" |"&Getssrq(StandInfo)&" |"&GetBzys(StandInfo)&" |"&GetBzGG(StandInfo)&" |"&GetCYGX(StandInfo)&" |"&GetBzfl(StandInfo)&" |"&GetFbrq(StandInfo)&" |"&Getbzlx(StandInfo)&" |"&GetBzxg(StandInfo)&" |"&Getbzsp(StandInfo)&" |"&Gettcdw(StandInfo)&" |"&Getqcdw(StandInfo)'&" |"&GetCYGX(AllInfo)&" |"&GetBzys(AllInfo)&" |"&GetBzzy(AllInfo)&" |"&GetBzjg(AllInfo)

StanInfo=StanInfo'&chr(13)
ctf1.Writeline(StanInfo)
if err.number<>0 then
response.Write filename&"<br>"
end if
StanInfo=""
Next

if err.number <> 0 then
response.write "操作出错:" + err.description
end if

ctf1.close
ctf.close
set ctf1=nothing
set ctf=nothing: set fso=nothing
%>
sansaolu 2004-11-17
  • 打赏
  • 举报
回复
Fso是什么東西???請舉例好嗎???
ygjwjj 2004-11-17
  • 打赏
  • 举报
回复
FSO+目录树;
树型目录在本版有很多例子,参考下.
flying310 2004-11-17
  • 打赏
  • 举报
回复
文件列表呀,用fso的文件夹文件操作函数就可以了。
inanition 2004-11-17
  • 打赏
  • 举报
回复
fso对象+递归.
sansaolu 2004-11-17
  • 打赏
  • 举报
回复
沒人理我嗎?

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧