note 12615 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 22:01:57 +0000 |
| Subject: | note 12615 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19777@lists.php.net to get a copy of this message | ||
This is a little comment for everyone out there that has had a problem with sending stuff to the
browser before the header and getting the lovly error message.
<?php
ob_start();
echo "hello";
header("someheader here");
ob_end_flush();
?>
ob_start will stop sending to the browser untill it gets the ob_end_flush() the good thing about
this is it orders everthing right it will send you header first even if its not what you put first
in the script. This also works for setcookie
enjoy