Added $_SESSION.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@70259 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Torben Wilson 2002-02-14 20:27:09 +00:00
parent a06b86e1da
commit 64c91ae4ac

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- Note: Please do not link or translate this file yet.
This is only an initial update, quite a few more commits will
@ -607,6 +607,48 @@ follow for this appendix. -->
</simpara>
</sect2>
<sect2 id="predefined.variables.session">
<title>Session variables: <varname>$_SESSION</varname></title>
<note>
<simpara>
Introduced in 4.1.0. In earlier versions, use
<varname>$HTTP_SESSION_VARS</varname>.
</simpara>
</note>
<simpara>
An associative array containing session variables available to
the current script. See the <link linkend="ref.session">Session
functions</link> documentation for more information on how this
is used.
</simpara>
<simpara>
This is a 'superglobal', or automatic global, variable. This
simply means that it is available in all scopes throughout a
script. You don't need to do a <command>global
$_SESSION;</command> to access it within functions or methods, as
you do with <varname>$HTTP_SESSION_VARS</varname>.
</simpara>
<simpara>
<varname>$HTTP_SESSION_VARS</varname> contains the same
information, but is not an autoglobal.
</simpara>
<simpara>
If the <link
linkend="ini.register-globals">register_globals</link> directive
is set, then these variables will also be made available in the
global scope of the script; i.e., separate from the
<varname>$_SESSION</varname> and <varname>$HTTP_SESSION_VARS</varname>
arrays. For related information, see the security chapter titled
<link linkend="security.registerglobals">Using Register
Globals</link>. These individual globals are not autoglobals.
</simpara>
</sect2>
</sect1>
<sect1 id="predefined.classes">