this needs a rewrite, some parts are incomprehensible due to lack
of structure.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@97896 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Sascha Schumann 2002-10-03 08:02:03 +00:00
parent 0fd67c018c
commit 16f04f7a49

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.14 $ -->
<!-- $Revision: 1.15 $ -->
<reference id="ref.session">
<title>Session handling functions</title>
<titleabbrev>Sessions</titleabbrev>
@ -134,10 +134,11 @@
Use of <varname>$_SESSION</varname> (or
<varname>$HTTP_SESSION_VARS</varname> with PHP 4.0.6 or less) is
recommended for improved security and code readablity. With
<varname>$_SESSION</varname>, there is no need to use
session_register()/session_unregister()/session_is_registered()
functions. Session variables are accessible like any other
variables.
<varname>$_SESSION</varname>, there is no need to use the
<function>session_register()</function>,
<function>session_unregister()</function>,
<function>session_is_registered()</function> functions. Session variables
are accessible like any other variables.
<example>
<title>
Registering a variable with $_SESSION.
@ -179,7 +180,7 @@ unset($_SESSION['count']);
<![CDATA[
<?php
session_start();
// With PHP 4.3 and later, you can also use simply use the prior example.
// With PHP 4.3 and later, you can also simply use the prior example.
session_unregister('count');
?>
]]>
@ -189,12 +190,12 @@ session_unregister('count');
<para>
If <link
linkend="ini.register-globals"><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. Since PHP must know which global variables are
registered as session variables, users need to register variables with
session_register() function. You can avoid this by simply setting entries
in <varname>$_SESSION</varname>.
is enabled, then each global variable can be registered as session
variable. Upon a restart of a session, these variables will be restored
to corresponding global variables. Since PHP must know which global
variables are registered as session variables, users need to register
variables with session_register() function. You can avoid this by simply
setting entries in <varname>$_SESSION</varname>.
<caution>
<para>
If you are using