#42524 [Opn->Csd]: file_get_contents() parameters in wrong order
| From: | nicobn@php.net | Date: | Mon, 03 Sep 2007 06:26:53 +0000 |
| Subject: | #42524 [Opn->Csd]: file_get_contents() parameters in wrong order | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969377995@lists.php.net to get a copy of this message | ||
ID: 42524
Updated by: nicobn@php.net
Reported By: i dot am dot inuyasha at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Windows XP
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2007-09-03 05:15:00] i dot am dot inuyasha at gmail dot com
Description:
------------
According to the manual:
http://ca3.php.net/manual/en/function.file-get-contents.php
file_get_contents() takes parameters string, resource, boolean, int,
int in V5.2.4. PHP however is telling me parameter 3 should be a
resource. The second and third parameters appear to be transposed.
Reproduce code:
---------------
$pa_news = file_get_contents($base_url . 'pa.txt', NULL, false,
ftell($file), 0);
Expected result:
----------------
Contents of file read into $pa_news.
Actual result:
--------------
Warning message is displayed:
Warning: file_get_contents() expects parameter 3 to be resource,
boolean given in F:\html\apache\index.php on line 46
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42524&edit=1