note 39169 deleted from function.fgets by irchtml
| From: | irchtml@php.net | Date: | Mon, 23 Feb 2004 08:04:29 +0000 |
| Subject: | note 39169 deleted from function.fgets by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-65569@lists.php.net to get a copy of this message | ||
Note Submitter: masar@MasarLabs.com
----
The Manual example prints a final empty line.
I think a better example is:
<?php
$handle = fopen("/tmp/inputfile.txt", "r");
if ($handle) {
$buffer = fgets($handle, 4096);
while (!feof($handle)) {
echo "$buffer";
$buffer = fgets($handle, 4096);
}
fclose($handle);
}
?>