mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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
This commit is contained in:
parent
6e83b9d812
commit
1c2873d603
1 changed files with 22 additions and 20 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue