From: csaba at alum dot mit dot edu Operating system: irrelevant PHP version: 5CVS-2005-03-30 (dev) PHP Bug Type: Documentation problem Bug description: resource context not documented in file_get_contents, file, readfile
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 -- Edit bug report at http://bugs.php.net/?id=32499&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32499&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32499&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32499&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32499&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32499&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32499&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32499&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32499&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32499&r=support Expected behavior: http://bugs.php.net/fix.php?id=32499&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32499&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32499&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32499&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32499&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32499&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32499&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32499&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32499&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32499&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32499&r=mysqlcfg
