RE: [PHP-WIN] Headers Already Sent - How To Overcome????
| From: | HKG) | Date: | Fri, 05 Nov 2004 07:50:49 +0000 |
| Subject: | RE: [PHP-WIN] Headers Already Sent - How To Overcome???? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-24891@lists.php.net to get a copy of this message | ||
> Is there a command or someway to get around this problem without
> hacking out all of the other header sending code?
Yes there is: check out out: ob_start(), ob_clean and ob_flush().
Put an ob_start() start at the very first line of your code, and just before
you send the header information, do an ob_clean(). This should clean out
anything that so far has been buffered in the out putbuffer.