PHP 日周月点击排行统计
复制代码 代码如下: $now=time(); //当前时间 $StrUpdate = “Update $tbl_article set hits=hits+1”; if(date(“d”,$lasthittime)==date(“d”,$now)){//同一天 $StrUpdate = $StrUpdate.”,dayhits = dayhits+1′′; }else{ $StrUpdate = $StrUpdate.”,dayhits = 0′′; } if(date(“W”,$lasthittime)==date(“W”,$now)){//同一周 $StrUpdate = $StrUpdat
用户评论