Document the optional second parameter to header()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@49941 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Rasmus Lerdorf 2001-06-21 13:29:05 +00:00
parent c8b83442db
commit 5a32b77fb5

View file

@ -20,6 +20,7 @@
<funcprototype>
<funcdef>int <function>header</function></funcdef>
<paramdef>string <parameter>string</parameter></paramdef>
<paramdef>bool <parameter><optional>replace</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
@ -28,6 +29,19 @@
header strings. See the <ulink url="&spec.http1.1;">HTTP 1.1
Specification</ulink> for more information on raw http headers.
</para>
<para>
The optional <parameter>replace</parameter> parameter indicates whether
the header should replace a previous similar header, or add a second header
of the same type. By default it will replace, but if you pass in false as
the second argument you can force multiple headers of the same type. For
example:
<informalexample>
<programlisting role="php">
header('www-authenticate: Negociate');
header('www-authenticate: NTLM',false);
</programlisting>
</informalexample>
</para>
<para>
There are two special-case header calls. The first is the
&quot;Location&quot; header. Not only does it send this header