diff --git a/reference/http/functions/headers-sent.xml b/reference/http/functions/headers-sent.xml index 40e2dffbfe..81e1f2f8d2 100644 --- a/reference/http/functions/headers-sent.xml +++ b/reference/http/functions/headers-sent.xml @@ -1,39 +1,41 @@ - + headers_sent - Returns &true; if headers have been sent + Checks if or where headers have been sent Description - boolheaders_sent - string&file + mixedheaders_sent + string&file int&line - - 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. - - - The function will return the php source file and line number where - output started in the optional file and - line parameters if these are given. - + + headers_sent will return &true; if no HTTP headers + have already been sent or &false; otherwise. If the optional + file and line parameters + are set, headers_sent will return the php source + file and line number where output started in the file. + + + 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. + Another option is to use Output Buffering. + + New parameters - file and line where - added for PHP 4.3.0. + The optional file and line + parameters where added in PHP 4.3.0. - See also header for a more detailed discussion - of the matters involved. + See also ob_start and header for a + more detailed discussion of the matters involved.