note 29549 added to function.readfile
| From: | Colin at rack1 dot php dot net | Date: | Mon, 17 Feb 2003 13:58:53 +0000 |
| Subject: | note 29549 added to function.readfile | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44090@lists.php.net to get a copy of this message | ||
In response to the above where someone commented as to why you get a strange number at the end if
you type:
echo readfile($filename)
The reason you get a weird number is that this is the return value of the function. From the
definition the function will automatically output the contents of the file (echo is implied).
$bytes = readfile($filename)
will output the file and store the number of bytes outputted in $bytes.
Hope this saves confusion for some folks.
--
http://www.php.net/manual/en/function.readfile.php
http://master.php.net/manage/user-notes.php?action=edit+29549
http://master.php.net/manage/user-notes.php?action=delete+29549
http://master.php.net/manage/user-notes.php?action=reject+29549