From 4c20c1c6a70ac13540f8a909d34c5c712d11d481 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 27 Oct 2005 20:31:18 +0000 Subject: [PATCH] clarify that greedy read is for regular local files only. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@199380 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/filesystem/functions/fread.xml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/reference/filesystem/functions/fread.xml b/reference/filesystem/functions/fread.xml index fa3beb3205..85094bd0b8 100644 --- a/reference/filesystem/functions/fread.xml +++ b/reference/filesystem/functions/fread.xml @@ -1,5 +1,5 @@ - + @@ -16,7 +16,7 @@ fread reads up to length bytes from the file pointer - referenced by handle. Reading stops when + referenced by handle. Reading stops when up to length bytes have been read, EOF (end of file) is reached, or (for network streams) when a packet becomes available, whichever comes first. @@ -63,11 +63,12 @@ fclose($handle); - When reading from network streams or pipes, such as those returned when + When reading from anything that is not a regular local file, such as + streams returned when reading remote files or from popen and fsockopen, reading will stop after a packet is available. This means that you should - collect the data together in chunks as shown in the example below. + collect the data together in chunks as shown in the examples below. @@ -75,6 +76,20 @@ fclose($handle); +]]> + + + + + + +