asp改错,请各位来帮帮忙
d盘下有文件夹myfolder代码如下:<HTML><HEAD><TITLE>文件夹内容</TITLE></HEAD><BODY><%'创建一个FileSystemObj...
d盘下有文件夹myfolder
代码如下:
<HTML>
<HEAD><TITLE>文件夹内容</TITLE></HEAD>
<BODY>
<%
'创建一个FileSystemObject对象的事例
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("d:\MyFolder")
'循环显示其中文件
For Each thing in MyFolder.Files
Response.Write("thing")
Next
%>
</Body>
</HTML>
运行时发生错误:
错误类型:
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/313.asp, line 12
Response.Write("thing")
请高手过来帮忙改改,不胜感激 展开
代码如下:
<HTML>
<HEAD><TITLE>文件夹内容</TITLE></HEAD>
<BODY>
<%
'创建一个FileSystemObject对象的事例
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
'创建一个Folder对象
Set MyFolder=MyFileObject.GetFolder("d:\MyFolder")
'循环显示其中文件
For Each thing in MyFolder.Files
Response.Write("thing")
Next
%>
</Body>
</HTML>
运行时发生错误:
错误类型:
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/313.asp, line 12
Response.Write("thing")
请高手过来帮忙改改,不胜感激 展开
展开全部
For Each thing in MyFolder.Files
Response.Write("<font size=2>")
filelen0=Len("d:\MyFolder\")
filelen=Len(thing)
filename=Right(thing,filelen-filelen0)
channel=Left(filename,2)
Response.Write("<p>channel:"&channel)
Response.Write(" <a href=play.asp?record=&thing&> >>></a>")
Response.Write("</font>")
Next
Response.Write("<font size=2>")
filelen0=Len("d:\MyFolder\")
filelen=Len(thing)
filename=Right(thing,filelen-filelen0)
channel=Left(filename,2)
Response.Write("<p>channel:"&channel)
Response.Write(" <a href=play.asp?record=&thing&> >>></a>")
Response.Write("</font>")
Next
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询