PHP function headers_sent()
Availability in PHP 4.0
Checks if or where headers have been sent
Parameters
| Parameter | Data type | Default value | Note |
|---|---|---|---|
$file |
string |
null, | If the optional file and line parameters are set, headers_sent will put the PHP source file name and line number where output started in the file and line variables. |
$line |
int |
null | The line number where the output started. |
Return values
bool
headers_sent will return false if no HTTP headers have already been sent or true otherwise.