sas Tue Dec 17 05:30:05 2002 EDT
Modified files:
/phpdoc/en/reference/session/functions session-is-registered.xml
session-register.xml
session-unregister.xml
Log:
improvements
Index: phpdoc/en/reference/session/functions/session-is-registered.xml
diff -u phpdoc/en/reference/session/functions/session-is-registered.xml:1.3
phpdoc/en/reference/session/functions/session-is-registered.xml:1.4
--- phpdoc/en/reference/session/functions/session-is-registered.xml:1.3 Sun Jun 16
03:11:03 2002
+++ phpdoc/en/reference/session/functions/session-is-registered.xml Tue Dec 17
+05:30:05 2002
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.8 -->
<refentry id="function.session-is-registered">
<refnamediv>
<refname>session_is_registered</refname>
<refpurpose>
- Find out if a variable is registered in a session
+ Find out whether a global variable is registered in a session
</refpurpose>
</refnamediv>
<refsect1>
@@ -16,7 +16,7 @@
</methodsynopsis>
<para>
<function>session_is_registered</function> returns &true; if there
- is a variable with the name <parameter>name</parameter>
+ is a global variable with the name <parameter>name</parameter>
registered in the current session.
</para>
<note>
Index: phpdoc/en/reference/session/functions/session-register.xml
diff -u phpdoc/en/reference/session/functions/session-register.xml:1.5
phpdoc/en/reference/session/functions/session-register.xml:1.6
--- phpdoc/en/reference/session/functions/session-register.xml:1.5 Fri Oct 4
05:44:35 2002
+++ phpdoc/en/reference/session/functions/session-register.xml Tue Dec 17 05:30:05
+2002
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.2 -->
<refentry id="function.session-register">
<refnamediv>
<refname>session_register</refname>
<refpurpose>
- Register one or more variables with the current session
+ Register one or more global variables with the current session
</refpurpose>
</refnamediv>
<refsect1>
@@ -24,6 +24,14 @@
</para>
<caution>
<para>
+ If you want your script to work regardless of register_globals, you need
+ to use the $_SESSION array. All $_SESSION entries are automatically
+ registered. If your script uses session_register(), it will not work in
+ environments where register_globals is disabled.
+ </para>
+ </caution>
+ <caution>
+ <para>
This registers a <emphasis>global</emphasis> variable. If you want to
register a session variable from within a function, you need to make sure to
make it global using the
@@ -70,21 +78,21 @@
</para>
<note>
<para>
- It is not currently possible to register resource variables in a
- session. For example, you can not create a connection to a
+ It is currently impossible to register resource variables in a
+ session. For example, you cannot create a connection to a
database and store the connection id as a session variable and
expect the connection to still be valid the next time the
session is restored. PHP functions that return a resource are
identified by having a return type of
- <literal>resource</literal> in their function definitions. A
+ <literal>resource</literal> in their function definition. A
list of functions that return resources are available in the
<link linkend="resource">resource types</link> appendix.
</para>
<para>
If <varname>$_SESSION</varname> (or
<varname>$HTTP_SESSION_VARS</varname> for PHP 4.0.6 or less) is
- used, assign variable to
- <varname>$_SESSION</varname>. i.e. $_SESSION['var'] = 'ABC';
+ used, assign values to
+ <varname>$_SESSION</varname>. For example: $_SESSION['var'] = 'ABC';
</para>
</note>
<para>
Index: phpdoc/en/reference/session/functions/session-unregister.xml
diff -u phpdoc/en/reference/session/functions/session-unregister.xml:1.3
phpdoc/en/reference/session/functions/session-unregister.xml:1.4
--- phpdoc/en/reference/session/functions/session-unregister.xml:1.3 Sun Jun 16
03:11:03 2002
+++ phpdoc/en/reference/session/functions/session-unregister.xml Tue Dec 17
+05:30:05 2002
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/session.xml, last change in rev 1.2 -->
<refentry id="function.session-unregister">
<refnamediv>
<refname>session_unregister</refname>
<refpurpose>
- Unregister a variable from the current session
+ Unregister a global variable from the current session
</refpurpose>
</refnamediv>
<refsect1>
@@ -15,7 +15,7 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
- <function>session_unregister</function> unregisters (forgets)
+ <function>session_unregister</function> unregisters
the global variable named <parameter>name</parameter> from the
current session.
</para>
@@ -33,7 +33,7 @@
</note>
<caution>
<para>
- This function doesn't unset the corresponding global variable for
+ This function does not unset the corresponding global variable for
<parameter>name</parameter>, it only prevents the variable from being
saved as part of the session. You must call <function>unset</function>
to remove the corresponding global variable.
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php