ASPのStatusプロパティ
サーバステータスラインステータス属性によって返される値を指定します。
ヒント:サーバーから返されたステータス行を変更するには、このプロパティを使用します。
文法
response.Status=statusdescription
参数 | 描述 |
---|---|
statusdescription | 三位数的数字,以及代码的描述,比如 404 Not Found 。 注意:状态值是在 HTTP 规范中定义的。 |
例
<%
ip=request.ServerVariables("REMOTE_ADDR")
if ip<>"194.248.333.500" then
response.Status="401 Unauthorized"
response.Write(response.Status)
response.End
end if
%>
ip=request.ServerVariables("REMOTE_ADDR")
if ip<>"194.248.333.500" then
response.Status="401 Unauthorized"
response.Write(response.Status)
response.End
end if
%>
完全なレスポンスオブジェクトリファレンス