mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Examples now use session_start();
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@78854 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
bc1a5e5dc1
commit
746ef0c5e9
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<reference id="ref.session">
|
||||
<title>Session handling functions</title>
|
||||
<titleabbrev>Sessions</titleabbrev>
|
||||
|
@ -82,6 +82,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
session_start();
|
||||
if (isset($HTTP_SESSION_VARS['count'])) {
|
||||
$HTTP_SESSION_VARS['count']++;
|
||||
}
|
||||
|
@ -109,6 +110,7 @@ else {
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
session_start();
|
||||
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
|
||||
if (!isset($_SESSION['count'])) {
|
||||
$_SESSION['count'] = 0;
|
||||
|
@ -126,9 +128,9 @@ if (!isset($_SESSION['count'])) {
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
session_start();
|
||||
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
|
||||
unset($_SESSION['count']);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue