绍兴胜利东路30号:ASP页有一个错误 预览后IE报错

来源:百度文库 编辑:中科新闻网 时间:2024/04/28 18:35:22
ASP页有一个错误 预览后IE报错
我立即修正了这个错误
可是预览IE还是报原来的错 即使那个变量已经不存在了

<br>列表显示本地驱动器的所有信息
<%
'on error resume next
set Odic=server.createobject("Scripting.dictionary")
with Odic
.add "path","盘符"
.add "drivetype","驱动器类型"
.add "filesystem","文件类型"
.add "volumeName","卷标"
.add "serialNumber","标识码"
.add "availablespace","可用空间"
.add "freespace","剩余空间"
.add "totalsize","驱动器容量"
end with
set OFso=server.createobject("scripting.filesystemobject")
set ODrv=OFso.drives
response.write "<table>"
for each i in ODrv
for each key in Odic
response.write "<tr><td align=center>"&Odic.item(key)&"</td><td align=center>"&Eval("i."&key)&"</td></tr>"
next
next
response.write "</table>"
%>

for each i in ODrv这一行报错
对象不是一个集合
/Scripting组件/6.2.filesystemobject2.asp,行 27

on error resume next 加上, 你的代码没问题

就是忽略 A 盘就可以了

你清空一下 缓存 之类的, 重新试试