public function monthaddyuanbao($dau_date='')
{
$tmp_file = '/tmp/logday_a.txt';
if(file_exists($tmp_file)){
$runDay = file($tmp_file);
$dau_date = date('Y-m-d',strtotime('-1 day',strtotime($runDay[count($runDay) - 1])));
if($dau_date == '2017-06-30'){
echo 'end';
exit;
}
}
//...........此处写相关导数据的代码
$fp = fopen ( $tmp_file, 'a+' );
fwrite ( $fp, $dau_date . "\r\n" );
}
$fp = fopen ( $tmp_file, 'a+' ); fwrite ( $fp, $dau_date . "\r\n" ); }