//$hc->find($log); //$hc->output(); //$hc->save(); //start foreach ($logs as $file_log) { if (!file_exists($file_log)) { continue; } $fp = fopen($file_log, 'r'); if (!$fp) { continue; } while (!feof($fp)) { $log = fgets($fp); //获得一行日志 $cc->find($log); $hc->find($log); } echo $file_log . " end\n"; } //处理抓取结果输出 $cc->do_result(); //$cc->output(); $cc->save(); //输出点击率 //$hc->output(); $hc->save(); //清理日志 system("rm -rf /home/whz/tongji/access_log.{$yesterday}_36"); system("rm -rf /home/whz/tongji/access_log.{$yesterday}_37"); system("rm -rf /home/whz/tongji/access_log.{$yesterday}_39");