21,894
社区成员




<?php
require_once('tongji.php');
$now_hour=date("H");
echo '时间:'.$n_time.'时间:'.$now_hour;
if((int)$n_time==(int)$now_hour)
{
echo '调用1';
require_once('all_tongji.php');
}else{
echo '调用2';
$filename='http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"];
$lines = file($filename."/admin2013/all_get_tongji.php");
foreach ($lines as $line_num => $line_txt) {
$text=$text.$line_txt;
}
$file_tongji=fopen("all_tongji.php","w+") or showmsg("写入文件 1 失败!",'1','');
fputs($file_tongji,$text);
fclose($file_tongji);
sleep(5); //请注意这个代码。
$fpx=fopen("tongji.php","w+") or showmsg("写入文件 2 失败!",'1','');
fputs($fpx,'<?php $n_time'. "= '".$now_hour."';?>");
fclose($fpx);
require_once('all_tongji.php');
}
?>