derick Wed Jun 18 05:26:18 2003 EDT
Modified files:
/phpdoc/en/reference/http/functions header.xml headers-sent.xml
setcookie.xml
Log:
- Consistency
Index: phpdoc/en/reference/http/functions/header.xml
diff -u phpdoc/en/reference/http/functions/header.xml:1.16
phpdoc/en/reference/http/functions/header.xml:1.17
--- phpdoc/en/reference/http/functions/header.xml:1.16 Sat May 24 23:07:25 2003
+++ phpdoc/en/reference/http/functions/header.xml Wed Jun 18 05:26:18 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.16 $ -->
+<!-- $Revision: 1.17 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
<refentry id="function.header">
<refnamediv>
@@ -26,6 +26,8 @@
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:
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -50,6 +52,8 @@
use a PHP script to handle requests for missing files (using
the <literal>ErrorDocument</literal> directive), you may want to
make sure that your script generates the proper status code.
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -57,39 +61,41 @@
header("HTTP/1.0 404 Not Found");
?>
]]>
- </programlisting>
- </informalexample>
- <note>
- <para>
- The HTTP status header line will always be the first sent
- to the client, regardless of the actual <function>header</function>
- call being the first or not. The status may be overridden
- by calling <function>header</function> with a new status line
- at any time unless the HTTP headers have already been sent.
- </para>
- </note>
- <note>
- <para>
- In PHP 3, this only works when PHP is compiled as an Apache
- module. You can achieve the same effect using the
- <literal>Status</literal> header.
- <informalexample>
- <programlisting role="php">
+ </programlisting>
+ </informalexample>
+ </para>
+ <note>
+ <para>
+ The HTTP status header line will always be the first sent
+ to the client, regardless of the actual <function>header</function>
+ call being the first or not. The status may be overridden
+ by calling <function>header</function> with a new status line
+ at any time unless the HTTP headers have already been sent.
+ </para>
+ </note>
+ <note>
+ <para>
+ In PHP 3, this only works when PHP is compiled as an Apache
+ module. You can achieve the same effect using the
+ <literal>Status</literal> header.
+ <informalexample>
+ <programlisting role="php">
<![CDATA[
<?php
header("Status: 404 Not Found");
?>
]]>
- </programlisting>
- </informalexample>
- </para>
- </note>
- </para>
+ </programlisting>
+ </informalexample>
+ </para>
+ </note>
<para>
The second special case is the "Location:" header. Not only does
it send this header back to the browser, but it also returns a
<literal>REDIRECT</literal> (302) status code to the browser unless
some <literal>3xx</literal> status code has already been set.
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -128,7 +134,9 @@
PHP scripts often generate dynamic content that must not be cached
by the client browser or any proxy caches between the server and the
client browser. Many proxies and clients can be forced to disable
- caching with
+ caching with:
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -143,23 +151,23 @@
]]>
</programlisting>
</informalexample>
- <note>
- <para>
- You may find that your pages aren't cached even if you don't
- output all of the headers above. There are a number of options
- that users may be able to set for their browser that change its
- default caching behavior. By sending the headers above, you should
- override any settings that may otherwise cause the output of your
- script to be cached.
- </para>
- <para>
- Additionally, <function>session_cache_limiter</function> and
- the <literal>session.cache_limiter</literal> configuration
- setting can be used to automatically generate the correct
- caching-related headers when sessions are being used.
- </para>
- </note>
</para>
+ <note>
+ <para>
+ You may find that your pages aren't cached even if you don't
+ output all of the headers above. There are a number of options
+ that users may be able to set for their browser that change its
+ default caching behavior. By sending the headers above, you should
+ override any settings that may otherwise cause the output of your
+ script to be cached.
+ </para>
+ <para>
+ Additionally, <function>session_cache_limiter</function> and
+ the <literal>session.cache_limiter</literal> configuration
+ setting can be used to automatically generate the correct
+ caching-related headers when sessions are being used.
+ </para>
+ </note>
<para>
Remember that <function>header</function> must be
called before any actual output is sent, either by normal HTML
@@ -169,6 +177,8 @@
function, and have spaces or empty lines that are output before
<function>header</function> is called. The same problem exists
when using a single PHP/HTML file.
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -181,24 +191,26 @@
]]>
</programlisting>
</informalexample>
- <note>
- <para>
- In PHP 4, you can use output buffering to get around this problem,
- with the overhead of all of your output to the browser being buffered
- in the server until you send it. You can do this by calling
- <function>ob_start</function> and <function>ob_end_flush</function>
- in your script, or setting the <literal>output_buffering</literal>
- configuration directive on in your &php.ini; or
- server configuration files.
- </para>
- </note>
</para>
+ <note>
+ <para>
+ In PHP 4, you can use output buffering to get around this problem,
+ with the overhead of all of your output to the browser being buffered
+ in the server until you send it. You can do this by calling
+ <function>ob_start</function> and <function>ob_end_flush</function>
+ in your script, or setting the <literal>output_buffering</literal>
+ configuration directive on in your &php.ini; or
+ server configuration files.
+ </para>
+ </note>
<para>
If you want the user to be prompted to save the data you are
sending, such as a generated PDF file, you can use the <ulink
url="&url.rfc;2183">Content-Disposition</ulink> header to
supply a recommended filename and force the browser to display the
save dialog.
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -215,15 +227,15 @@
]]>
</programlisting>
</informalexample>
- <note>
- <para>
- There is a bug in Microsoft Internet Explorer 4.01 that prevents
- this from working. There is no workaround. There is also a bug
- in Microsoft Internet Explorer 5.5 that interferes with this,
- which can be resolved by upgrading to Service Pack 2 or later.
- </para>
- </note>
</para>
+ <note>
+ <para>
+ There is a bug in Microsoft Internet Explorer 4.01 that prevents
+ this from working. There is no workaround. There is also a bug
+ in Microsoft Internet Explorer 5.5 that interferes with this,
+ which can be resolved by upgrading to Service Pack 2 or later.
+ </para>
+ </note>
<note>
<simpara>
If <link linkend="ini.safe-mode">safe mode</link> is enabled the
Index: phpdoc/en/reference/http/functions/headers-sent.xml
diff -u phpdoc/en/reference/http/functions/headers-sent.xml:1.12
phpdoc/en/reference/http/functions/headers-sent.xml:1.13
--- phpdoc/en/reference/http/functions/headers-sent.xml:1.12 Mon Jan 27 22:02:38
2003
+++ phpdoc/en/reference/http/functions/headers-sent.xml Wed Jun 18 05:26:18 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.7 -->
<refentry id="function.headers-sent">
<refnamediv>
@@ -28,7 +28,6 @@
Another option is to use <link linkend="ref.outcontrol">Output Buffering</link>.
</simpara>
<note>
- <title>New parameters</title>
<simpara>
The optional <parameter>file</parameter> and <parameter>line</parameter>
parameters where added in PHP 4.3.0.
Index: phpdoc/en/reference/http/functions/setcookie.xml
diff -u phpdoc/en/reference/http/functions/setcookie.xml:1.23
phpdoc/en/reference/http/functions/setcookie.xml:1.24
--- phpdoc/en/reference/http/functions/setcookie.xml:1.23 Fri Jun 6 01:06:26
2003
+++ phpdoc/en/reference/http/functions/setcookie.xml Wed Jun 18 05:26:18 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.23 $ -->
+<!-- $Revision: 1.24 $ -->
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
<refentry id="function.setcookie">
<refnamediv>
@@ -207,7 +207,7 @@
<para>
Some examples follow how to send cookies:
<example>
- <title><function>setcookie</function> send examples</title>
+ <title><function>setcookie</function> send example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -227,6 +227,8 @@
is automatically decoded and assigned to a variable by the same
name as the cookie name. To see the contents of our test
cookie in a script, simply use one of the following examples:
+ </para>
+ <para>
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -246,8 +248,10 @@
When deleting a cookie you should assure that the expiration date
is in the past, to trigger the removal mechanism in your browser.
Examples follow how to delete cookies sent in previous example:
+ </para>
+ <para>
<example>
- <title><function>setcookie</function> delete examples</title>
+ <title><function>setcookie</function> delete example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -265,6 +269,8 @@
you have array elements, but when the cookie is received by your
script, the values are all placed in an array with the cookie's
name:
+ </para>
+ <para>
<example>
<title><function>setcookie</function> and arrays</title>
<programlisting role="php">
@@ -294,28 +300,32 @@
</programlisting>
</example>
</para>
- <para>
- For more information on cookies, see Netscape's cookie
- specification at <ulink
- url="&spec.cookies;">&spec.cookies;</ulink> and
- <ulink url="&url.rfc;2965">RFC 2965</ulink>.
- </para>
- <para>
- You may notice the <parameter>expire</parameter> parameter takes on a
- unix timestamp, as opposed to the date format <literal>Wdy, DD-Mon-YYYY
- HH:MM:SS GMT</literal>, this is because PHP does this conversion
- internally.
- </para>
- <simpara>
- Microsoft Internet Explorer 4 with Service Pack 1 applied does
- not correctly deal with cookies that have their path parameter
- set.
- </simpara>
- <simpara>
- Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x
- appear to handle cookies incorrectly when the path and time
- are not set.
- </simpara>
+ <note>
+ <para>
+ For more information on cookies, see Netscape's cookie
+ specification at <ulink
+ url="&spec.cookies;">&spec.cookies;</ulink> and
+ <ulink url="&url.rfc;2965">RFC 2965</ulink>.
+ </para>
+ <para>
+ You may notice the <parameter>expire</parameter> parameter takes on a
+ unix timestamp, as opposed to the date format <literal>Wdy, DD-Mon-YYYY
+ HH:MM:SS GMT</literal>, this is because PHP does this conversion
+ internally.
+ </para>
+ </note>
+ <note>
+ <simpara>
+ Microsoft Internet Explorer 4 with Service Pack 1 applied does
+ not correctly deal with cookies that have their path parameter
+ set.
+ </simpara>
+ <simpara>
+ Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x
+ appear to handle cookies incorrectly when the path and time
+ are not set.
+ </simpara>
+ </note>
<para>
See also <function>header</function> and the
<link linkend="features.cookies">cookies section</link>.
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php