note 43675 added to function.fgets
| From: | Trizorofwww dot freedom-uplink dot org at rn2 dot php dot net | Date: | Wed, 30 Jun 2004 02:28:34 +0000 |
| Subject: | note 43675 added to function.fgets | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72144@lists.php.net to get a copy of this message | ||
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);
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.fgets.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43675
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43675&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43675&report=yes
Search -- http://master.php.net/manage/user-notes.php