asp使用Fso时 对不起!您提交的参数可能存在错误 ;请重新提交... 高手进!!!

来源:百度知道 编辑:UC知道 时间:2024/06/09 21:26:45
代码如下:
m_path=server.mappath("../Include/Class_Template.html")
response.write m_path
Set Fso = Server.CreateObject("Scripting.FileSystemObject")
If not Fso.FileExists("http:\\localhost\Include\Class_Template.html") Then%>
<script language=javascript>
alert( "生成失败,模板文件不存在!" );
//location.href = "javascript:history.back()"
</script>
<%
Else
Set fso_line = fso.opentextfile(m_path,1,True)
mynews=fso_line.readall '读取模板文件内容
End if
运行结果:
C:\Inetpub\wwwroot\网络求职招聘人才网站系统正式版\Include\Class_Template.html 对不起!您提交的参数可能存在错误 ;请重新提交...

问题:怎么会提示 参数出错啊,参数已经输出来了,应该不会有问题吗,怎么回事啊,请高手赐教啊 谢谢 15分
If not Fso.FileExists("http:\\localhost\Include\Class_Template.html") 我发送的时候能错了,调试的时候使用的是If not Fso.FileExists(m_path) ,但是结果一样

If not Fso.FileExists("http:\\localhost\Include\Class_Template.html")

应该使用本站相对路径。不要加网址。

If not Fso.FileExists("http:\\localhost\Include\Class_Template.html") 这个地方用相对路径可能会好一点,就像你的m_path