philip Wed Nov 6 17:10:40 2002 EDT Modified files: /phpdoc/en/reference/http/functions headers-sent.xml Log: Rewrote the docs; it is now mixed; closed bug #20292. Index: phpdoc/en/reference/http/functions/headers-sent.xml diff -u phpdoc/en/reference/http/functions/headers-sent.xml:1.7 phpdoc/en/reference/http/functions/headers-sent.xml:1.8 --- phpdoc/en/reference/http/functions/headers-sent.xml:1.7 Wed Nov 6 16:47:17 2002 +++ phpdoc/en/reference/http/functions/headers-sent.xml Wed Nov 6 17:10:40 2002 @@ -1,39 +1,41 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/http.xml, last change in rev 1.7 --> <refentry id="function.headers-sent"> <refnamediv> <refname>headers_sent</refname> - <refpurpose>Returns &true; if headers have been sent</refpurpose> + <refpurpose>Checks if or where headers have been sent</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> - <type>bool</type><methodname>headers_sent</methodname> - <methodparam><type>string</type><parameter>&file</parameter></methodparam> + <type>mixed</type><methodname>headers_sent</methodname> + <methodparam +choice="opt"><type>string</type><parameter>&file</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>&line</parameter></methodparam> </methodsynopsis> - <para> - This function returns &true; if the HTTP headers have already been - sent, &false; otherwise. You can't add any more header lines using - the <function>header</function> function once the header block has - already been sent. Using this function you can at least prevent - getting the "Duplicate headers ..." error messages. - </para> - <para> - The function will return the php source file and line number where - output started in the optional <parameter>file</parameter> and - <parameter>line</parameter> parameters if these are given. - </para> + <simpara> + <function>headers_sent</function> will return &true; if no HTTP headers + have already been sent or &false; otherwise. If the optional + <parameter>file</parameter> and <parameter>line</parameter> parameters + are set, <function>headers_sent</function> will return the php source + file and line number where output started in the <parameter>file</parameter>. + </simpara> + <simpara> + You can't add any more header lines using the <function>header</function> + 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 <link linkend="ref.outcontrol">Output Buffering</link>. + </simpara> <note> + <title>New parameters</title> <simpara> - <parameter>file</parameter> and <parameter>line</parameter> where - added for PHP 4.3.0. + The optional <parameter>file</parameter> and <parameter>line</parameter> + parameters where added in PHP 4.3.0. </simpara> </note> <para> - See also <function>header</function> for a more detailed discussion - of the matters involved. + See also <function>ob_start</function> and <function>header</function> for a + more detailed discussion of the matters involved. </para> </refsect1> </refentry>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php