本來想存表的,想了想還是這樣減輕點(diǎn)數(shù)據(jù)庫壓力吧
// pv統(tǒng)計(jì)
private function pv($m,$name){
$uid = $_SESSION['UserId']?$_SESSION['jx_uuid']:0;
if(is_file('pvlog/'.$m.'/'.$name.".txt")){
$count=file_get_contents('pvlog/'.$m.'/'.$name.".txt");
$count = $count.'/@!#%/'.time().'--||--'.$uid;
file_put_contents('pvlog/'.$m.'/'.$name.".txt", $count);
}else {
file_put_contents('pvlog/'.$m.'/'.$name.".txt",time().'/-/'.$uid);
}
}
image.png