From a7b98eb2dbfe34958382535b90bba40784d1180d Mon Sep 17 00:00:00 2001 From: Drak Date: Tue, 13 Mar 2012 02:12:21 +0000 Subject: [PATCH] [session] Simplify the basic session introduction. This information is duplicated elsewhere. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324172 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/session/examples.xml | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/reference/session/examples.xml b/reference/session/examples.xml index 75b2ee2028..b8dba94bd4 100644 --- a/reference/session/examples.xml +++ b/reference/session/examples.xml @@ -5,7 +5,6 @@ &reftitle.examples;
Basic usage - Sessions are a simple way to store data for individual users against a unique session ID. This can be used to persist state information between page requests. Session IDs are normally @@ -37,16 +36,7 @@ Sessions normally shutdown automatically when PHP is finished executing a script, but can be manually shutdown using the session_write_close function. - - Use of $_SESSION (or - $HTTP_SESSION_VARS with PHP 4.0.6 or less) is - recommended for improved security and code readability. With - $_SESSION, there is no need to use the - session_register, - session_unregister, - session_is_registered functions. Session variables - are accessible like any other variables. Registering a variable with <varname>$_SESSION</varname>. @@ -66,9 +56,7 @@ if (!isset($_SESSION['count'])) { </example> <example> <title> - Unregistering a variable with <varname>$_SESSION</varname> and - <link - linkend="ini.register-globals">register_globals</link> disabled. + Unregistering a variable with <varname>$_SESSION</varname>. - - If register_globals - 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 - $_SESSION. - - - If register_globals - is enabled, then the global variables and the - $_SESSION entries will automatically reference the - same values which were registered in the prior session instance. - However, if the variable is registered by $_SESSION - then the global variable is available since the next request. -