What makes you think you can echo something after your script has timed out? Change that print to write something to a file in /tmp and you will see that it works just fine.
-Rasmus On Sat, 18 May 2002, 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.") > ----------------------------------------------------------- > <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" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > 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 > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php