mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Docs patch from Stefan Livieratos <sli@mailsurf.com>
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@26276 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c33896777c
commit
e627cf1b8c
1 changed files with 43 additions and 9 deletions
|
@ -35,15 +35,49 @@
|
|||
by the session module unless the user defines them later.
|
||||
</para>
|
||||
<para>
|
||||
<literal>track_vars</literal> and <literal>gpc_globals</literal>
|
||||
configuration settings influence how the session variables get
|
||||
restored. If <literal>track_vars</literal> is enabled, then the
|
||||
restored session variables will be available in the global
|
||||
associative array $HTTP_STATE_VARS. If
|
||||
<literal>gpc_globals</literal> is enabled, then the session
|
||||
variables will be restored to corresponding global variables. If
|
||||
both of these settings are enabled, then the globals variables and
|
||||
the $HTTP_STATE_VARS entries will reference the same value.
|
||||
<literal>track_vars</literal> and <literal>register_globals</literal>
|
||||
configuration settings influence how the session variables get stored
|
||||
and restored.
|
||||
</para>
|
||||
<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.
|
||||
<example>
|
||||
<title>
|
||||
Registering a variable with <literal>track_vars</literal> enabled
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
session_register("count");
|
||||
$HTTP_SESSION_VARS["count"]++;
|
||||
?>
|
||||
</programlisting>
|
||||
</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.
|
||||
<example>
|
||||
<title>
|
||||
Registering a variable with <literal>register_globals</literal> enabled
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
session_register("count");
|
||||
$count++;
|
||||
?>
|
||||
</programlisting>
|
||||
</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.
|
||||
</para>
|
||||
<para>
|
||||
There are two methods to propagate a session id:
|
||||
|
|
Loading…
Reference in a new issue