PHP5禁用COOKIE后SESSION还能用吗?
时间:2011-04-14 来源:wk0423
<?php
//c.php页面
session_start ();
$_SESSION ['test'] = 'test';
echo 'session["test"]=' . $_SESSION ['test'];
?>
<a href="d.php?<?php echo htmlspecialchars(SID);?>">D</a>
<?php
//d.php页面
$sid = $_GET ['PHPSESSID'];
session_id ( $sid );
session_start ();
echo 'session["test"]=' . $_SESSION ['test'];
相关阅读 更多 +