[英]VBScript runtime error '800a01a8', Object required: '' when using WScript.Quit
I am putting the final pieces into a VBScript page and one thing I want to handle is if the variable being passed in via the URL is empty. 我将最后的片段放入VBScript页面中,我要处理的一件事是,通过URL传递的变量是否为空。 If that is the case, I want the page to stop running and show a 'must log in' message. 如果是这种情况,我希望页面停止运行并显示“必须登录”消息。
I have the following code in place: 我有以下代码:
<%
If (Request.QueryString("nn") = "") Then
Response.Write "<p>You must be logged in to view content. <a href='http://URL/login?ReturnUrl=/interests'>Click here</a> to log in.</p>"
WScript.Quit
End If
%>
The error throws on the line WScript.Quit
. 该错误引发WScript.Quit
行。 Any ideas? 有任何想法吗?
WScript.Quit
, as the name implies, is part of the Windows Script Host
. 顾名思义, WScript.Quit
是Windows Script Host
。 You appear to be using VBScript within a different host: ASP. 您似乎在其他主机上使用VBScript:ASP。 If you need to stop processing an ASP page, just end the server's response by using: 如果您需要停止处理ASP页面,只需使用以下命令结束服务器的响应:
Response.End
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.