|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-02-26 23:08 UTC] OvdSpek at LIACS dot NL
Description: ------------ I tried to use the code from the example, but it doesn't work. It appears the status header has been ignored completely. http://php.net/header GET /temp/404.php HTTP/1.0 HTTP/1.1 200 OK Date: Sat, 26 Feb 2005 22:02:43 GMT Server: Apache/2.0.53 (Win32) PHP/5.0.3 X-Powered-By: PHP/5.0.3 Status: 404 Not Found Content-Length: 0 Connection: close Content-Type: text/html; charset=ISO-8859-1 Reproduce code: --------------- <?php header("Status: 404 Not Found"); ?> Expected result: ---------------- HTTP/1.1 404 Not Found Actual result: -------------- HTTP/1.1 200 OK Date: Sat, 26 Feb 2005 22:02:43 GMT Server: Apache/2.0.53 (Win32) PHP/5.0.3 X-Powered-By: PHP/5.0.3 Status: 404 Not Found Content-Length: 0 Connection: close Content-Type: text/html; charset=ISO-8859-1 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 14 14:00:01 2025 UTC |
The docs clearly state that this example is for PHP3 and you should use <? header("HTTP/1.0 404 Not Found"); ?> for versions >3. Please check if it works fine for you.Will do. Just wondering, why did the summary change from header("Status: 404 Not Found"); doesn't work to Multiple small packets send for HTTP request?This works: <?php header("HTTP/1.0 404 Not Found"); ?>