Hi Chris,
You should delete the ; after the while statement because it causes an
infinite loop.
----- Original Message -----
From: "Chris Blake" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 27, 2003 16:29
Subject: [PHP] Reading files
> Greetings...
>
> When the following runs..........
> ===========================================================
> <?php
>
> $handle = fopen ("fopen.txt", "r");
> $date = date("l dS of F Y h:i:s: A");
>
> while (!feof ($handle)) ;
> {
> $buffer = fgets($handle, 4096);
> echo '<textarea>'. $buffer. '</textarea>';
>
> }
> fclose($handle);
> ?>
> ============================================================
>
> .....it gives out........
>
> ============================================================
>
> Fatal error: Maximum execution time of 30 seconds exceeded in
> /home/data/ClientWebs/chrisplay/Things/fopen.php on line 16
> ============================================================
>
> I used the example from php.net/fget() and have tried a few changes
> based on other stuff I read, but to no avail.....
>
> Line 16 is = " while (!feof ($handle)) ; "
>
> Suggestions ?
>
>
> --
> Chris Blake
> Office : (011) 782-0840
> Cell : 083 985 0379
> It is reported that somewhere in the world, every 15 seconds, a woman
> gives birth to a child. She must be found and stopped.
>
>
> --
> 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