note 43675 deleted from function.fgets by tomsommer
| From: | tomsommer@php.net | Date: | Wed, 30 Jun 2004 05:15:06 +0000 |
| Subject: | note 43675 deleted from function.fgets by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-72154@lists.php.net to get a copy of this message | ||
Note Submitter: Trizor of www.freedom-uplink.org
----
Saku, yours is a little klunky.
better method:
<?php
@ $fp = fopen ("foo.txt", 'r');
/* why test for the pointer being true? It will return true unless foo.txt doesn't exist, in
which case the script will halt. */
while (!feof($fp) {
$TEXT. = fgets ($fp, 999);
}
?>