【发布时间】:2015-05-10 23:10:48
【问题描述】:
如果是 404 Not Found 代码的结果,我想在页面上显示一些附加文本。我想在其他地方重用页面的其余部分。
<div>
<?php
if(page_is_404_redirect)
{
<div>Oh no, I couldn't find what you were looking for.</div>
}
>?
...
</div>
我在$_SERVER variable page 上没有找到任何似乎表明错误代码结果的内容。如何查看错误码状态?
【问题讨论】:
-
@Jay - 我没有主持这个,所以我必须看看 curl 库是否已设置。感谢您的链接
标签: php redirect http-status-code-404 system-variable