|
Posted by Thomas 'PointedEars' Lahn on 10/27/85 11:33
Randy Webb wrote:
> Thomas 'PointedEars' Lahn said the following on 11/29/2005 9:54 AM:
>> [in PHP, header() only works if there was no previous output.]
>
> Not entirely true.
,-<URL:http://php.net/manual/en/function.header.php>
|
| Remember that header() must be called before any actual output is sent,
| either by normal HTML tags, blank lines in a file, or from PHP. It is a
| very common error to read code with include(), or require(), functions,
| or another file access function, and have spaces or empty lines that are
| output before header() is called. The same problem exists when using a
| single PHP/HTML file.
Maybe you are referring to this:
| <?php
| header("HTTP/1.0 404 Not Found");
| ?>
|
| Note: The HTTP status header line will always be the first sent to the
| client, regardless of the actual header() call being the first or not.
| [...]
However, additional header() calls, including sending issueing HTTP status
headers do not qualify as "(actual) output" here.
X-Post & F'up2 comp.lang.php
PointedEars
[Back to original message]
|