Re: When are headers sent? (headers_sent function)
| From: | Jochem Maas | Date: | Fri, 09 Feb 2007 21:23:38 +0000 |
| Subject: | Re: When are headers sent? (headers_sent function) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-248691@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
> On Fri, 2007-02-09 at 11:24 -0800, Philippe Piernot wrote:
>> I understand that the headers_sent() function will tell me whether headers
>> have been sent or not.
>> What I do not understand is what triggers the headers to be sent to the
>> browser in the first place.
>> Does this happen as soon as the first output occurs?
>
> Probably. Unless you have output buffering enabled, in which case
> headers are sent when the PHP process completes.
or whenever the outer most output buffer is flushed [to the client]
- whichever comes first.
>
> Cheers,
> Rob.