代码如下:[removed] if(getCookie(“num”)){ var nn=parseInt(getCookie(“num”)); setCookie(“num”,++nn); }else{ setCookie(“num”,1); } function getCookie(name){ var str=[removed].split(“;”); for(i=0;i<str.length;i++){ var str2=str[i].split(“=”) if(str2[0].re
本文实例讲述了CI(CodeIgniter)简单统计访问人数实现方法。分享给大家供大家参考,具体如下:
废话不说,先上代码:
控制器文件:
/application/controllers/hello.php 如下:
<?php if ( ! defined('BASEPATH')) exit('No direct scr ipt access allowed');
class Hello extends CI_Controller {
public function index()
MySQL页面访问统计及排名情况
统计访问页面数量,以分辨率进行排名
SELECT CONCAT(`height` , '*', `width`) AS `resolution` , COUNT(CONCAT(`height`, '*', `width`)) AS `total`
FROM `wifi_status_page`
GROUP BY CONCAT(`height`, '*', `width`)
ORDER BY `total` DESC
LIMIT 0 , 30
最近7天页面访问