note 92305 added to function.header
| From: | mjt at jpeto dot net | Date: | Sat, 18 Jul 2009 06:01:32 +0000 |
| Subject: | note 92305 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158453@lists.php.net to get a copy of this message | ||
For all the examples above:
I strongly recommend, that you use
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
instead of
header("HTTP/1.1 404 Not Found");
I had big troubles with an Apache/2.0.59 (Unix) answering in HTTP/1.0 while I (accidentially) added
a "HTTP/1.1 200 Ok" - Header.
Most of the pages were displayed correct, but on some of them apache added weird content to it:
A 4-digits HexCode on top of the page (before any output of my php script), seems to be some kind of
checksum, because it changes from page to page and browser to browser. (same code for same page and
browser)
"0" at the bottom of the page (after the complete output of my php script)
It took me quite a while to find out about the wrong protocol in the HTTP-header.
----
Server IP: 81.223.48.75
Probable Submitter: 84.113.246.151
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/92305
Del: integrated -- https://master.php.net/note/delete/92305/integrated
Del: useless -- https://master.php.net/note/delete/92305/useless
Del: bad code -- https://master.php.net/note/delete/92305/bad+code
Del: spam -- https://master.php.net/note/delete/92305/spam
Del: non-english -- https://master.php.net/note/delete/92305/non-english
Del: in docs -- https://master.php.net/note/delete/92305/in+docs
Del: other reasons-- https://master.php.net/note/delete/92305
Reject -- https://master.php.net/note/reject/92305
Search -- https://master.php.net/manage/user-notes.php