Set the HTTP response status code to 404:
<?php
http_response_code(404);
?>
The http_response_code() function sets or returns the HTTP response status code.
http_response_code(
code)
Parameter | Description |
---|---|
code | Optional. Specifies a response code (like 404) |
Return Value: | If code is set, the previous status code is returned. If code is not set, the current status code is returned |
---|---|
PHP Version: | 5.4+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!