php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #32499 resource context not documented in file_get_contents, file, readfile
Submitted: 2005-03-30 12:18 UTC Modified: 2005-03-31 17:02 UTC
From: csaba at alum dot mit dot edu Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5CVS-2005-03-30 (dev) OS: irrelevant
Private report: No CVE-ID: None
 [2005-03-30 12:18 UTC] csaba at alum dot mit dot edu
Description:
------------
There are a huge lot of file functions (e.g. file_put_contents, file_get_contents, file, readfile, etc.) that take a 'resource context' argument, but I don't find this documented under the manual entry for the individual functions, nor under the File system entry (http://at.php.net/manual/en/ref.filesystem.php), nor does google.com show an obvious location for it when I put in "resource context" and tell PHP to search within the online documentation.

This might not be such an issue, but file_get_contents take additional arguments (offset, maxlen) AFTER the resource context and there isn't even an example for the default to use.  Nor is there mention of the type (eg. string) that this argument should be.

There is mention of Stream contexts at http://at2.php.net/stream but a reasonable person reading through would have to conclude that they are different animals since the function documentation so consistently sticks with 'resource context' whereas the streams section talks exclusively about 'stream context'.

Furthermore, the example (number 2 at the link above) cited at http://bugs.php.net/bug.php?id=27628&edit=2 does not directly address this either

Csaba Gabor from Vienna

Expected result:
----------------
It would be nice to have a link to the centralized documentation for 'resource context' along with an example


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 17:02 UTC] vrana@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 16:01:31 2024 UTC