note 56358 deleted from function.header by bjori
| From: | bjori@php.net | Date: | Mon, 27 Mar 2006 09:47:23 +0000 |
| Subject: | note 56358 deleted from function.header by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106716@lists.php.net to get a copy of this message | ||
Note Submitter: grey - greywyvern - com
----
I forgot to mention, as a addendum to my note below, that this unusual behaviour with 4xx and 5xx
codes is a good reason to always use the header() function's built in HTTP response code
sender.
<?php
header("Location: http://www.example.com/error.php", true,
412);
?>
This code will send the correct "412 Precondition Failed" header along with the
"Location" header, without having to worry about header() order.