note 63737 deleted from function.fgets by bjori
| From: | bjori@php.net | Date: | Wed, 29 Mar 2006 18:53:25 +0000 |
| Subject: | note 63737 deleted from function.fgets by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106959@lists.php.net to get a copy of this message | ||
Note Submitter: wuweixin at gmail dot com
Reason: in docs
----
This demo program maybe have some question:
<?php
$handle = fopen("/tmp/inputfile.txt", "r");
while (!feof($handle)) {
$buffer = fgets($fd, 4096);
echo $buffer;
}
fclose($handle);
?>
in the program begin use $handle for file pointer
but in middle of the program use $fd for the pointer
then uses's browner will be unactive
mybe this is right
<?php
$handle = fopen("/tmp/inputfile.txt", "r");
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
?>