Stopping a php script that's running in the background -
i've been following tutorials on running , managing php scrips background process. i've been playing script below.
<?php $count = 0; while(true){ $count = $count + 1; file_put_contents('daemon1.log', $count, file_append); sleep(1); } ?> when run navigating it's url in browser window , close window seems keep running. typical of php scripts? how stop process once it's running int background?
when run navigating url in browser window , close window seems keep running. typical of php scripts?
it keep running because it's still working.
it die when maximum execution time or memory limit hit.
how stop process once it's running in background?
to stop it, use construct such exit.
Comments
Post a Comment