From 1c2873d603061a9637ac114974444e5cb58b9cc3 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 6 Nov 2002 22:10:40 +0000 Subject: [PATCH] Rewrote the docs; it is now mixed; closed bug #20292. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@102826 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/http/functions/headers-sent.xml | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) 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.