【发布时间】:2018-04-06 02:39:21
【问题描述】:
当我运行header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); 时,IIS 8.5(在带有 php 5.6.31 的 Windows Server 2012r2 上)只显示一个空白页。但是,页眉会报告 404 状态代码。当页面实际上不存在时,如何使 IIS 显示发送的默认错误页面?
【问题讨论】:
-
我也试过
header('Status: 404 Not Found');和http_response_code(404);没有运气
标签: php iis http-headers