mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
improvements
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@108362 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
4472cc3f63
commit
53d13b3cf1
3 changed files with 22 additions and 14 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
@ -22,6 +22,14 @@
|
|||
each name, <function>session_register</function> registers the global
|
||||
variable with that name in the current session.
|
||||
</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
|
||||
|
@ -70,21 +78,21 @@ $HTTP_SESSION_VARS["spongebob"] = "He's got square pants.";
|
|||
</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>
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue