At 13:53 24-4-2001 -0700, Rasmus Lerdorf wrote:
> > I would like to see a timeout function implemented in PHP (something like
> > Perl's alarm function would be perfect). I notice there is a
> > set_time_limit() function in PHP, but it cannot be applied to a specified
> > block of code (it applies to the entire script) and it causes a fatal error
> > when the timeout is reached (instead of letting you run some alternate code
> > if the timeout is reached).
>
>That's not true. If you use register_shutdown_function() then this
>function you register will be run once the timeout hits. See the chapter
>in the manual on connection handling.
But you can't continue normally from within the register_shutdown_function
(output to browser and stuff)
You can't use it more than once etc.
I think it's a good option (and submitted a feature request a long time ago
for that)
http://www.php.net/bugs.php?id=3830
Greetz,
Wico
>-Rasmus
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]