note 102527 deleted from function.header by tularis
| From: | tularis@php.net | Date: | Fri, 04 Apr 2014 11:23:04 +0000 |
| Subject: | note 102527 deleted from function.header by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-199139@lists.php.net to get a copy of this message | ||
Note Submitter: ben at netsup-spa@m-portchat dot com
----
Doh! I kept getting the "headers already sent" error message on a header("Location:
.....") call. I checked, re-checked, and re-checked and the scripts nor the files it included
had any output - no trailing whitespace, nothing. I was stumped for quite some time and then
realized I had used:
<?php
header("Something Else");
flush(); // !!!!
?>
In one of the includes. Obviously, when you flush() for the first time it must complete sending the
headers, so you can't make any more header() calls!