how detect stop or running a php script from out and background
问题 I have this code: <?PHP ignore_user_abort(true); set_time_limit (0); while(1) { // my codes } ?> now After a while how to detect that script is running yet or not? I used this role for this question: <?PHP ignore_user_abort(true); set_time_limit (0); while(1) { // my codes $statusfile = strtolower(file_get_contents('status.txt')); // for stop checking if (!(strpos($statusfile,'stop') !== false)) break; $status = /* my status */; // for writing status of itself file_put_contents('status.txt',