note 53162 deleted from function.header by bjori

From: Date: Mon, 27 Mar 2006 09:50:43 +0000
Subject: note 53162 deleted from function.header by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-106726@lists.php.net to get a copy of this message
Note Submitter: francois at bonzon dot com ---- With output buffering on, when sending headers that shouldn't have any data after them, be sure to erase the buffer before exit()ing the script! Like this: <?php ob_clean(); exit(); ?> If you don't erase the buffer, in case it was not empty, after sending the headers PHP will still send the buffer content to the browser. I had Firefox show strange behavior with some of my pages, that it took me quite some time to debug. It was simply because my script was returning 304 Not Modified headers along with the start of an HTML page.

« previous php.notes (#106726) next »