mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Use $_SESSION superglobal instead of assuming register_globals = On
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129915 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9d4667b37f
commit
0c5494bd00
1 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.37 $ -->
|
||||
<!-- $Revision: 1.38 $ -->
|
||||
<reference id="ref.session">
|
||||
<title>Session handling functions</title>
|
||||
<titleabbrev>Sessions</titleabbrev>
|
||||
|
@ -268,12 +268,11 @@ session_unregister('count');
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (!session_is_registered('count')) {
|
||||
session_register("count");
|
||||
$count = 0;
|
||||
if (! isset($_SESSION['count'])) {
|
||||
$_SESSION['count'] = 1;
|
||||
}
|
||||
else {
|
||||
$count++;
|
||||
$_SESSION['count']++;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
|
|
Loading…
Reference in a new issue