note 33020 added to function.fread
| From: | Bob at rack1 dot php dot net | Date: | Fri, 13 Jun 2003 22:49:31 +0000 |
| Subject: | note 33020 added to function.fread | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50314@lists.php.net to get a copy of this message | ||
As of 4.3.2, the functionality of fread has changed in regards to sockets and url wrappers. You can
no longer read $length bytes from the file pointer. There is a note in the documentation above which
shows you what you have to do.
Even though I read that, it didnt click because who would think that a long time PHP function like
this would change in functionality and the only indication is a Note: in the docs.
When fread()'ing a network connection, you must loop the fread() to read in all the data one
packet at a time.
Forcing PHP scripts to wrap this sort of low-level programming around what was previously a
perfectly useful high-level function defeats the whole purpose of a scripting language and was
irresponsible to say the least.
----
Manual Page -- http://www.php.net/manual/en/function.fread.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33020
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33020&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33020&report=yes