Re: Time limit on recursive procedure?
| From: | Per Jessen | Date: | Sun, 07 Jun 2009 11:04:20 +0000 |
| Subject: | Re: Time limit on recursive procedure? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293691@lists.php.net to get a copy of this message | ||
Clancy wrote:
> I have a recursive procedure, and I set the time limit each time I
> enter it:
>
> function rec_scan($directory, ......)
> {
> set_time_limit (1);
>
> if (is_dir($new_file))
> {
> rec_scan ($new_file, ....)
> }
>
> }
>
>
> The way I read the manual, the timer should be reset each time I call
> rec_scanl,
You keep calling it so as long as the execution time between each call
is < 1 second, your script will keep going.
/Per
--
Per Jessen, Zürich (15.4°C)