Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ignore_user_abort(false); // Do not ignore user abort
- set_time_limit(0); // Allow script to run forever
- /* sleep 10 seconds */
- for($i = 0; $i < 10; ++$i)
- {
- /* ignore_user_abort/connection_status won't work without these 3 instructions: */
- echo chr(0); // write something to the output buffer (a null character)
- ob_flush(); // send/clear the output buffer
- flush();
- sleep(1);
- }
- // This file won't be created when the connection is aborted.
- file_put_contents('helloWorld', '');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement