headers_sent

(PHP 3>= 3.0.8, PHP 4 )

headers_sent -- Returns TRUE if headers have been sent

Description

bool headers_sent ( void)

This function returns TRUE if the HTTP headers have already been sent, FALSE otherwise. You can't add any more header lines using the header() function once the header block has already been sent. Using this function you can at least prevent getting the "Duplicate headers ..." error messages.

See also header() for a more detailed discussion of the matters involved.