svn: /phpdoc/en/trunk/reference/session/ examples.xml

From: Date: Tue, 13 Mar 2012 02:12:21 +0000
Subject: svn: /phpdoc/en/trunk/reference/session/ examples.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9867@lists.php.net to get a copy of this message
drak Tue, 13 Mar 2012 02:12:21 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=324172 Log: [session] Simplify the basic session introduction. This information is duplicated elsewhere. Changed paths: U phpdoc/en/trunk/reference/session/examples.xml Modified: phpdoc/en/trunk/reference/session/examples.xml =================================================================== --- phpdoc/en/trunk/reference/session/examples.xml 2012-03-13 01:39:06 UTC (rev 324171) +++ phpdoc/en/trunk/reference/session/examples.xml 2012-03-13 02:12:21 UTC (rev 324172) @@ -5,7 +5,6 @@ &reftitle.examples; <section xml:id="session.examples.basic"> <title>Basic usage</title> - <note> <para> 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 <function>session_write_close</function> function. </para> - </note> <para> - 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 readability. With - <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 <varname>$_SESSION</varname>. @@ -66,9 +56,7 @@ </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>. </title> <programlisting role="php"> <![CDATA[ @@ -96,26 +84,6 @@ to restore a reference to another variable. </para> </warning> - <para> - If <link - linkend="ini.register-globals">register_globals</link> - 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 <function>session_register</function> function. - You can avoid this by simply setting entries in - <varname>$_SESSION</varname>. - </para> - <para> - If <link - linkend="ini.register-globals">register_globals</link> - is enabled, then the global variables and the - <varname>$_SESSION</varname> entries will automatically reference the - same values which were registered in the prior session instance. - However, if the variable is registered by <varname>$_SESSION</varname> - then the global variable is available since the next request. - </para> </section> <section xml:id="session.idpassing">

« previous php.doc.cvs (#9867) next »