svn: /phpdoc/en/trunk/reference/filesystem/functions/ file-get-contents.xml
| From: | Torben Wilson | Date: | Wed, 09 Sep 2009 07:31:53 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/filesystem/functions/ file-get-contents.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4880@lists.php.net to get a copy of this message | ||
torben Wed, 09 Sep 2009 07:31:53 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=288188
Log:
Noted that the maxlen param is actually not -1 but is instead an
internal value (PHP_STREAM_COPY_ALL) and may not be directly specified
from within a script.
Addresses bug #49038 (although perhaps this is better fixed in the long
term by making file_get_contents() behave normally).
Bug: http://bugs.php.net/49038 (Open) Wrong documentation
for file_get_contents()
Changed paths:
U phpdoc/en/trunk/reference/filesystem/functions/file-get-contents.xml
Modified: phpdoc/en/trunk/reference/filesystem/functions/file-get-contents.xml
===================================================================
--- phpdoc/en/trunk/reference/filesystem/functions/file-get-contents.xml 2009-09-09 06:12:33 UTC
(rev 288187)
+++ phpdoc/en/trunk/reference/filesystem/functions/file-get-contents.xml 2009-09-09 07:31:53 UTC
(rev 288188)
@@ -34,6 +34,15 @@
need to encode the URI with <function>urlencode</function>.
</para>
</note>
+ <note>
+ <para>
+ The default value of <parameter>maxlen</parameter> is not
+ actually <literal>-1</literal>; rather, it is an internal PHP
+ value which means to copy the entire stream until end-of-file is
+ reached. The only way to specify this default value is to leave it
+ out of the parameter list.
+ </para>
+ </note>
</refsect1>
<refsect1 role="parameters">
@@ -136,7 +145,8 @@
<term><parameter>maxlen</parameter></term>
<listitem>
<para>
- Maximum length of data read.
+ Maximum length of data read. The default is to read until end
+ of file is reached.
</para>
</listitem>
</varlistentry>