产品使用及交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

关于网站统计数据的问题? [复制链接]

1#
在这个网站统计中,“今日访问”必须登录后台才能+1,但是我想做的是只要是打开首页就+1,怎么修改?

统计代码:

<html>
<head>
<style type="text/css">
div{font:12px/1.7em Verdana,Tahoma,Helvetica,Arial,sans-serif;}
div .hs{colorff0000}
</style>
</head>
<body bgColor="transparent">
<div>
○- 文章总数:<span class="hs"><%=Get_Data("co","select count(id) as co from article")%></span><br>
○- 今日文章:<span class="hs"><%=Get_Data("co","select count(id) as co from article where datediff('d',thedate,Now())=0")%></span><br>
○- 会员总数:<span class="hs"><%=Get_Data("co","select count(id) as co from pa_member")%></span><br>
○- 最新会员:<span class="hs"><%=Get_Data("username","select top 1 username from pa_member order by id desc")%></span><br>
○- 访问总数:<span class="hs"><%=Get_Data("co","select count(id) as co  from pa_count")%></span><br>
○- 本月访问:<span class="hs"><%=Get_Data("co","select count(id) as co  from pa_count where datediff('m',thedate,Now())=0")%></span><br>
○- 今日访问:<span class="hs"><%=Get_Data("co","select count(id) as co  from pa_count where datediff('d',thedate,Now())=0")%></span><br>
</div>
</body>
</html>
分享 转发
TOP
2#

这个统计是基于系统统计表,默认一个ip只统计一次,你想打开首页就加一,只能自己写一个统计功能,代码很复杂,这里仅提供思路,自己写一个js脚本,然后建一个xml文件,用户每打开首页一次就通过ajax修改xml文件里面的数值+1,然后统计功能再来读取这个xml文件中数值
TOP
3#

好的,学习了
TOP
发新话题 回复该主题