Hi Giunta
On 5/28/07, Gaetano Giunta <[EMAIL PROTECTED]> wrote:
Hello there.
The online manual for fread states clearly "Returns the read string or FALSE
in case of error."
I was always puzzled by that assertion, and today decided to digg into the
code.
As a matter of fact, the only time fread returns FALSE (on php 5) is when it
is invoked whith a negative $length, or with a single parameter.
In PHP4.4 and 5.2 (didn't check HEAD) fread() will return false (and a
warning thrown) if the resource argument isn't a stream resource and
if the the second argument (length) is 0 or less.
NULL will be returned (and warning thrown) if fread() doesn't get
passed two arguments (like most other functions).
Maybe an update would be appropriate?
I don't see anything wrong with them.. But if you have any suggestions
the least we could do is hear them out.
-Hannes