Gen. partnerAlgotech

PHP function headers_sent()

Checks if or where headers have been sent

|
September 11, 2019

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.

Other resources

Official headers-sent documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.