diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 28928e4c39..33ffdd85b3 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -556,7 +556,7 @@ fclose ($fp); stringfgets intfp - intlength + intlength Returns a string of up to length - 1 bytes read from the file @@ -572,8 +572,8 @@ fclose ($fp); Common Pitfalls: - People used to the 'C' semantics of fgets should note the - difference in how EOF is returned. + People used to the 'C' semantics of fgets + should note the difference in how EOF is returned. The file pointer must be valid, and must point to a file @@ -581,6 +581,12 @@ fclose ($fp); popen, or fsockopen. + + + The length parameter is only optional in + PHP 4.1.0 and newer versions. + + A simple example follows: