Re: register_shutdown_function - uses for
| From: | Steve Werby | Date: | Tue, 10 Apr 2001 19:12:42 +0000 |
| Subject: | Re: register_shutdown_function - uses for | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48067@lists.php.net to get a copy of this message | ||
"Greig, Euan" <Euan.Greig@brann.com> wrote:
> I was hoping that I could use this function to enable me to finish scripts
tidily
> when they time out or are aborted by the user. eg display the message
"script
> timed out". However this will not work as no output is allowed in the
shutdown
> function. I can see other ways to do what I want (but suggestions would
> always be welcome) but the real point of this email is this: what sort of
thing
> would you use register_shutdown_function to achieve?
I've used it for database inserts or calls to external programs that took a
long time, but did not affect the output sent to the browser. In those
cases I used register_shutdown_function() inside a control structure to call
another function (after outputting HTML from within the same control
structure).
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/