经典ASP:什么情况下不会定义Response对象?
我们有一个 ASP 页面:
GetProducts.asp
Response.Charset = "ISO-8859-1"
,七年后我们突然收到错误:
Object not defined: Response
我们将文件更改为:
Alert("before");
Response.Charset = "ISO-8859-1"
Alert("after");
然后将其改回:
Response.Charset = "ISO-8859-1"
现在一切都很好。
- 在什么情况下经典 ASP
Response
对象变量不会被定义? - 为什么触摸该文件(已经多年没有触摸过)会使 Response 对象再次定义?
We have an ASP page:
GetProducts.asp
Response.Charset = "ISO-8859-1"
and after seven years we suddenly got the error:
Object not defined: Response
We changed the file to:
Alert("before");
Response.Charset = "ISO-8859-1"
Alert("after");
and then changed it back to:
Response.Charset = "ISO-8859-1"
And now all is well.
- Under what circumstances would the classic ASP
Response
object variable not be defined? - Why would touching the file (that hasn't been touched in years) make the
Response
object defined again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
response 是 ASP 的东西,alert 是 javascript 的东西。您确定您没有意外删除某个使 javascript 尝试运行 ASP 指令的结束
%>
或反之亦然?response is an ASP thing, and alert is a javascript thing. You sure you didn't accidentally remove a closing
%>
somewhere that made javascript try to run an ASP instruction or viseversa?