Set fso = CreateObject("Scripting.FileSystemObject")
Set txt = fso.OpenTextFile(classfile,1)
classjs=txt.ReadLine
classjs=replace(classjs,"document.write('"," ")
classjs=replace(classjs,"')"," ")
txt.close
显示其中的第二行错误
错误的原因是:对象不支持此属性或方法: 'fso.OpentestFile'
搞了很久没搞出来,希望大家帮帮我~谢谢~累~
错误类型:
Microsoft VBScript 运行时错误 (0x800A003E)
输入超出了文件尾
/admin8/makeclass.asp, 第 142 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 1.1.4322)
网页:
POST 51 ??? /admin8/makeclass.asp
POST Data:
MaxPerPage=16&Depth=0&demoid=10&Submit=%BF%AA%CA%BC
时间:
2007年4月23日, 上午 12:48:20
详细信息:
Microsoft 支持
贵求高手~事后可赠送商业版电子商务平台
4 个解决方案
#1
你要确保server.mappath("../autojs/class"&RootID&".js")文件中有内容
加个判断吧
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
End if
加个判断吧
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
End if
#2
估计文件里是空的,没有内容。
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
classjs=replace(classjs,"document.write('"," ")
classjs=replace(classjs,"')"," ")
end if
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
classjs=replace(classjs,"document.write('"," ")
classjs=replace(classjs,"')"," ")
end if
#3
用这个试试
Set txt = fso.GetFile(classfile)
或者
Set txt = fso.OpenTextFile(classfile, ForWriting, True)
Set txt = fso.GetFile(classfile)
或者
Set txt = fso.OpenTextFile(classfile, ForWriting, True)
#4
Set fso = CreateObject("Scripting.FileSystemObject")
改为
set fso=server.CreateObject("scripting.filesystemobject")
改为
set fso=server.CreateObject("scripting.filesystemobject")
#1
你要确保server.mappath("../autojs/class"&RootID&".js")文件中有内容
加个判断吧
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
End if
加个判断吧
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
End if
#2
估计文件里是空的,没有内容。
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
classjs=replace(classjs,"document.write('"," ")
classjs=replace(classjs,"')"," ")
end if
IF txt.AtEndOfStream <> true then
classjs=txt.ReadLine
classjs=replace(classjs,"document.write('"," ")
classjs=replace(classjs,"')"," ")
end if
#3
用这个试试
Set txt = fso.GetFile(classfile)
或者
Set txt = fso.OpenTextFile(classfile, ForWriting, True)
Set txt = fso.GetFile(classfile)
或者
Set txt = fso.OpenTextFile(classfile, ForWriting, True)
#4
Set fso = CreateObject("Scripting.FileSystemObject")
改为
set fso=server.CreateObject("scripting.filesystemobject")
改为
set fso=server.CreateObject("scripting.filesystemobject")