在服务器上存储cookie数据

时间:2013-10-28 13:42:01

标签: javascript cookies

我有js客户端代码,每次用户打开我的网址xyz.com时会触发一些事件x。我想在每次用户打开网址时增加计数

关键值 计数1,再次点击时更新为2。 我怎么能这样做?

1 个答案:

答案 0 :(得分:0)

将它放在脚本的最顶层:

<?php
session_start();
$HIT=1;
$total=$from_db_count+$HIT;
//create function that generates the total hits from DB and return $from_db_count
?>
相关问题