cvs: phpdoc /en/features cookies.xml

From: Date: Thu, 20 Dec 2001 21:21:05 +0000
Subject: cvs: phpdoc /en/features cookies.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969340174@lists.php.net to get a copy of this message
jimw Thu Dec 20 16:21:05 2001 EDT Modified files: /phpdoc/en/features cookies.xml Log: document $_COOKIE, $HTTP_COOKIE_VARS, mention relevant configuration settings, be more explicit in pointing to setcookie documentation, note how to use output buffering Index: phpdoc/en/features/cookies.xml diff -u phpdoc/en/features/cookies.xml:1.11 phpdoc/en/features/cookies.xml:1.12 --- phpdoc/en/features/cookies.xml:1.11 Wed Dec 12 15:46:34 2001 +++ phpdoc/en/features/cookies.xml Thu Dec 20 16:21:04 2001 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <chapter id="features.cookies"> <title>Cookies</title> @@ -10,14 +10,31 @@ <function>setcookie</function> function. Cookies are part of the HTTP header, so <function>setcookie</function> must be called before any output is sent to the browser. This is the same limitation that - <function>header</function> has.</para> + <function>header</function> has. You can use the <link + linkend="ref.outcontrol">output buffering functions</link> to delay the + script output until you have decided whether or not to set any cookies or + send any headers. + </para> <para> - Any cookies sent to you from the client will automatically be - turned into a PHP variable just like GET and POST method data. If - you wish to assign multiple values to a single cookie, just add - <emphasis>[]</emphasis> to the cookie name. For more details see - the <function>setcookie</function> function.</para> + Any cookies sent to you from the client will automatically be turned into a + PHP variable just like GET and POST method data, depending on the + <literal>register_globals</literal> and <literal>gpc_order</literal> + configuration variables. If you wish to assign multiple values to a single + cookie, just add <emphasis>[]</emphasis> to the cookie name. + </para> + + <para> + In PHP 4.1.0 and later, the <literal>$_COOKIE</literal> auto-global + array will always be set with any cookies sent from the client. + <literal>$HTTP_COOKIE_VARS</literal> is also set in earlier versions of PHP + when the <literal>track_vars</literal> configuration variable is set. + </para> + + <para> + For more details, including notes on browser bugs, see the + <function>setcookie</function> function. + </para> </chapter>

« previous php.doc (#969340174) next »