Re: Register_Shutdown_Function ??

From: Date: Sun, 19 May 2002 00:52:02 +0000
Subject: Re: Register_Shutdown_Function ??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98307@lists.php.net to get a copy of this message
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.") ----------------------------------------------------------- <br> <b>Fatal error</b>: Maximum execution time of 1 second exceeded in <b>C:\test999.php</b> on line <b>14</b><br > <br> <b>Fatal error</b>: Maximum execution time of 1 second exceeded in <b>C:\test999.php</b> on line <b>7</b><br> ---------------------------------------------------------- "Jason Caldwell" <jason@thinkingman.org> wrote in message news:20020518212445.37756.qmail@pb1.pair.com... > I'm playing with the register_shutdown_function -- it's seems to work fine > if I call exit() within my script -- however, it doesn't seem to work when > the script times-out. Anyone know why? It's supposed to work in the event > of an error, time-out, user-abort, or script-exit. > > Thanks > Jason > > >

« previous php.general (#98307) next »