一个session很菜的问题
想用session记录数据在服务器端(以下代码),可是为什么重新刷新页面后,$count却不变的?本意是在刷新后$count自增1的,可为什么不能实现呢?代码出错了吗?在此请教各位,先谢谢了
<?
session_start();
session_register("count");
session_register("myname");
session_register("mylove");
$myname="abc";
$mylove="myself";
$count++;
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>session</title>
</head>
<body>
count变量为:<? echo $count; ?><br>
我的ID为:<? echo session_id(); ?><br>
</body>
</html>