日期:2014-05-17  浏览次数:20830 次

请大侠帮助看一下该程序错在哪里,急!!
<html>
<head>
<title>   显示目录及文件并做成链接 </title>
</head>
<body>
<%
  dirto= "bbs/ "
set   fs=createobject( "scripting.filesystemobject ")
set   f=fs.getfolder(server.mappath(dirto))
set   fd=f.subfolders
response.write   " <h2> 目录 </h2> <blockquote> "
for   each   whatever   in   fd
response.write   " <a   href= ' "
response.write.request.servervariables( "script_name ")
response.write   "?path= "&whatever.name
response.write   " '> "
response.write   whatever.name& "- "whatever.datecreated
response.write   " </a> <br> "
next
response.write   " </blockquote> <hr> "
response.write   " <h2> 文件 </h2> <blockquote> "
set   fc=f.files
for   each   whatever   in   fc
response.write   " <a   href= ' "
response.write   dirto&whatever.name
response.write   " '> "
response.write.whatever.name& "- "whatever.datecreated
response.write   " </a> <br> "
next
response.write   " </blockquote> <hr> "

%>
</body>
</html>


------解决方案--------------------
<html>
<head>
<title> 显示目录及文件并做成链接 </title>
</head>
<body>
<%
dirto= "adsjs/ "
set fs=createobject( "scripting.filesystemobject ")
set f=fs.getfolder(server.mappath(dirto))
set fd=f.subfolders
response.write " <h2> 目录 </h2> <blockquote> "
for each whatever in fd
response.write " <a href= ' "
response.write request.servervariables( "script_name ")
response.write "?path= "&whatever.name
response.write " '> "
response.write whatever.name& "- "&whatever.datecreated
response.write " </a> <br> "
next
response.write " </blockquote> <hr> "
response.write " <h2> 文件 </h2> <blockquote> "
set fc=f.files
for each whatever in fc
response.write " <a href= ' "
response.write dirto&whatever.name
response.write " '> "
response.write whatever.name& "- "&whatever.datecreated
response.write " </a> <br> "
next
response.write " </blockquote> <hr> "

%>
</body>
</html>