ignore_user_abort(); // run script. in background set_time_limit(0); // run script. forever $interval=30; // do every 0.5 minutes... do{ $fp = fopen(‘interval.txt‘,‘a‘); fwrite($fp,‘1‘); fclose($fp); sleep($interval); // wait 0.5 minutes }while(true);
时间: 2024-10-13 10:00:15