01.
<?
02.
session_start();
03.
04.
05.
echo
'SERVER_NAME : '
.
$_SERVER
[
'SERVER_NAME'
] .
'<BR />'
;
06.
echo
'SERVER_ADDR : '
.
$_SERVER
[
'SERVER_ADDR'
] .
'<BR />'
;
07.
echo
'SERVER_SERVER_SOFTWARE : '
.
$_SERVER
[
'SERVER_SOFTWARE'
] .
'<BR />'
;
08.
echo
'session.save_handler : '
.
ini_get
(
'session.save_handler'
) .
'<BR />'
;
09.
echo
'session.save_path : '
.
ini_get
(
'session.save_path'
) .
'<BR /><BR />'
;
10.
11.
12.
if
(
$_SESSION
[
'check'
])
13.
{
14.
echo
'increment count <br />'
;
15.
16.
$_SESSION
[
'reflashCnt'
]++;
17.
}
18.
else
19.
{
20.
21.
echo
'create session information <br />'
;
22.
$_SESSION
[
'check'
] = true;
23.
$_SESSION
[
'name'
] =
'lovelgw'
;
24.
$_SESSION
[
'age'
] = 21;
25.
$_SESSION
[
'reflashCnt'
] = 0;
26.
}
27.
28.
foreach
(
$_SESSION
as
$key
=>
$value
)
29.
echo
$key
.
' => '
.
$value
.
'<BR>'
;
30.
31.
?>