note 92907 added to function.header
| From: | mungo at osu1 dot php dot net | Date: | Fri, 14 Aug 2009 03:42:08 +0000 |
| Subject: | note 92907 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159465@lists.php.net to get a copy of this message | ||
Just a warning on the note below by "andre at luyer dot nl".
The line...
<?
header("Status: 301");
?>
Will not actually set the response code, there's no such header field. The reponse code needs
to be part of the status line at the top of the headers, not set as an extra header field. Use the
3rd argument of header() to set the response code instead i.e...
<?
header('Location: http://www.example.com',
true, 301);
?>
----
Server IP: 117.55.229.1
Probable Submitter: 124.171.207.225
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/92907
Del: integrated -- https://master.php.net/note/delete/92907/integrated
Del: useless -- https://master.php.net/note/delete/92907/useless
Del: bad code -- https://master.php.net/note/delete/92907/bad+code
Del: spam -- https://master.php.net/note/delete/92907/spam
Del: non-english -- https://master.php.net/note/delete/92907/non-english
Del: in docs -- https://master.php.net/note/delete/92907/in+docs
Del: other reasons-- https://master.php.net/note/delete/92907
Reject -- https://master.php.net/note/reject/92907
Search -- https://master.php.net/manage/user-notes.php