Home > PHP > Function > Network > headers_sent()

headers_sent()

headers_sent - Checks if or where headers have been sent

Syntax

bool headers_sent (string &$file, int &$line)

Arguments

  • file - 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 - The line number where the output started.

Description

Checks if or where headers have been sent.

Version

PHP 4, 5

Return value

headers_sent() will return FALSE if no HTTP headers have already been sent or TRUE otherwise.