note 13192 deleted from function.register-shutdown-function by jimw
| From: | jimw@php.net | Date: | Tue, 18 Dec 2001 19:46:17 +0000 |
| Subject: | note 13192 deleted from function.register-shutdown-function by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23175@lists.php.net to get a copy of this message | ||
Apparently Register_ShutDown_Function() makes the user's browser hang on for the ride.
It (IMO) should be the behaviour of PHP that you can do time intensive operations that the user need
not wait for (sending mail, writing to log files, cleaning up open connections) in the shutdown....
However.. if you register a function in the shutdown that takes a lot of time, the page won't
render for the user till its done. :(
function WasteTime(){
sleep(10);
}
Register_ShutDown_Function("WasteTime");
exit();
Count to 10, and then you'll see the page.
Playing with flush() didn't help me solve this problem. Any ideas, please e-mail me.