note 74896 added to function.header
| From: | nebbian at osu1 dot php dot net | Date: | Thu, 03 May 2007 00:00:12 +0000 |
| Subject: | note 74896 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126129@lists.php.net to get a copy of this message | ||
If you're trying to change the response code from 404 to 200, then simply sending a
"HTTP/1.1 200 OK" won't work in higher versions of PHP (>4.4.2). You need to do
this:
<?
// header("HTTP/1.0 200 OK"); // DOESN'T WORK!
header("Status: 200"); // Works fine! :-)
?>
Hopefully this note saves some frustration.
----
Server IP: 203.220.0.234
Probable Submitter: 59.154.24.147
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/74896
Del: integrated -- https://master.php.net/note/delete/74896/integrated
Del: useless -- https://master.php.net/note/delete/74896/useless
Del: bad code -- https://master.php.net/note/delete/74896/bad+code
Del: spam -- https://master.php.net/note/delete/74896/spam
Del: non-english -- https://master.php.net/note/delete/74896/non-english
Del: in docs -- https://master.php.net/note/delete/74896/in+docs
Del: other reasons-- https://master.php.net/note/delete/74896
Reject -- https://master.php.net/note/reject/74896
Search -- https://master.php.net/manage/user-notes.php