可能重复:
Why doesn't apache show a 404 error when I send a 404 header with php?
代码是这样的:
<?PHP
header("Status: 404 Not Found");
exit;
?>
如果我在浏览器中打开网站,我会得到一个空白网站,而不是404错误。 标题是:
HTTP/1.1 404 Not Found
Date: Sat, 18 Feb 2012 21:48:57 GMT
Server: Apache
X-Powered-By: PHP/5.3.10
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=3, max=100
Connection: Keep-Alive
Content-Type: text/html
我错了什么?提前致谢