session丢失一问(很急,大家帮忙)
// shopping1.php shopping2.php -- shopping5.php就是PageID不同,分别是2-5
<form action="shopping6.php" method="get"input type=hidden name=PageID value="1"><input type=hidden name=action value="a">
You have
<?php
//session_start();
if (!session_is_registered('cart_item')) {
session_register('cart_item');
$cart_item=0;
echo $cart_item." unreg ";
}
else {
echo $HTTP_SESSION_VARS['cart_item']." reg ";
}
?>
item(s) in your Shopping Cart
</b>
</form>
我在这我个页面跳转的时候(页面上有link相联),有的时候会发生session('cart_item')丢失.有的时候又是好的.请问怎么解决
环境保护: php4.03pl1 +Linux lenw2.2 + apache 1.3.14
这个代码在windows2000+iis+php5.1下面不会发生这个问题