Re: Register_Shutdown_Function ??
| From: | CC Zona | Date: | Sun, 19 May 2002 02:07:22 +0000 |
| Subject: | Re: Register_Shutdown_Function ?? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98315@lists.php.net to get a copy of this message | ||
In article <20020519005201.26095.qmail@pb1.pair.com>,
jason@thinkingman.org (Jason Caldwell) wrote:
> Here's my code:
> ----------------
> <?
> set_time_limit(1);
> function clean_up()
> {
> if(connection_status() & TIMEOUT)
> print("Script timed out.\n");
> }
> register_shutdown_function("clean_up");
> while(1);
> ?>
>
> Here's the message I get: (I should get "Script timed out.")
No, you shouldn't/wouldn't, because--as is noted in the docs
<http://php.net/register-shutdown-function>--no
more output ("print" is
specifically mentioned as an example) can be sent to the browser at that
stage. Try sending youself an email, or logging to a file instead.
--
CC