mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added links to the configuration docs for track_vars and register_globals,
and added another note about track_vars being always on in versions >= 4.0.3 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@32506 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
cbc1550a42
commit
d93fe9368f
1 changed files with 39 additions and 18 deletions
|
@ -35,19 +35,36 @@
|
|||
by the session module unless the user defines them later.
|
||||
</para>
|
||||
<para>
|
||||
<literal>track_vars</literal> and <literal>register_globals</literal>
|
||||
configuration settings influence how the session variables get stored
|
||||
and restored.
|
||||
</para>
|
||||
The <link
|
||||
linkend="ini.track-vars"><literal>track_vars</literal></link> and
|
||||
<link
|
||||
linkend="ini.track-vars"><literal>register_globals</literal></link>
|
||||
configuration settings influence how the session variables get
|
||||
stored and restored.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
As of PHP 4.0.3, <link
|
||||
linkend="ini.track-vars"><literal>track_vars</literal></link> is
|
||||
always turned on.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
If <literal>track_vars</literal> is enabled and
|
||||
<literal>register_globals</literal> is disabled, only members of the
|
||||
global associative array $HTTP_SESSION_VARS can be registered as
|
||||
session variables. The restored session variables will only be
|
||||
available in the array $HTTP_SESSION_VARS.
|
||||
If <link
|
||||
linkend="ini.track-vars"><literal>track_vars</literal></link> is
|
||||
enabled and <link
|
||||
linkend="ini.track-vars"><literal>register_globals</literal></link>
|
||||
is disabled, only members of the global associative array
|
||||
$HTTP_SESSION_VARS can be registered as session variables. The
|
||||
restored session variables will only be available in the array
|
||||
$HTTP_SESSION_VARS.
|
||||
<example>
|
||||
<title>
|
||||
Registering a variable with <literal>track_vars</literal> enabled
|
||||
Registering a variable with <link
|
||||
linkend="ini.track-vars"><literal>track_vars</literal></link>
|
||||
enabled
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
|
@ -58,12 +75,14 @@ $HTTP_SESSION_VARS["count"]++;
|
|||
</example>
|
||||
</para>
|
||||
<para>
|
||||
If <literal>register_globals</literal> is enabled, then all global
|
||||
variables can be registered as session variables and the session
|
||||
variables will be restored to corresponding global variables.
|
||||
If <link
|
||||
linkend="ini.track-vars"><literal>register_globals</literal></link>
|
||||
is enabled, then all global variables can be registered as session
|
||||
variables and the session variables will be restored to
|
||||
corresponding global variables.
|
||||
<example>
|
||||
<title>
|
||||
Registering a variable with <literal>register_globals</literal> enabled
|
||||
Registering a variable with <link linkend="ini.track-vars"><literal>register_globals</literal></link> enabled
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
|
@ -74,10 +93,12 @@ $count++;
|
|||
</example>
|
||||
</para>
|
||||
<para>
|
||||
If both <literal>track_vars</literal> and
|
||||
<literal>register_globals</literal> are enabled, then the globals
|
||||
variables and the $HTTP_SESSION_VARS entries will reference the same
|
||||
value.
|
||||
If both <link
|
||||
linkend="ini.track-vars"><literal>track_vars</literal></link> and
|
||||
<link
|
||||
linkend="ini.track-vars"><literal>register_globals</literal></link>
|
||||
are enabled, then the globals variables and the $HTTP_SESSION_VARS
|
||||
entries will reference the same value.
|
||||
</para>
|
||||
<para>
|
||||
There are two methods to propagate a session id:
|
||||
|
|
Loading…
Reference in a new issue