Doc #53790 [Opn->Csd]: about "file_get_contents()"

From: Date: Wed, 26 Jan 2011 20:39:25 +0000
Subject: Doc #53790 [Opn->Csd]: about "file_get_contents()"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5869@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53790&edit=1 ID: 53790 Updated by: philip@php.net Reported by: fx4084 at gmail dot com Summary: about "file_get_contents()" -Status: Open +Status: Closed Type: Documentation Problem Package: *General Issues Operating System: WIN7 PHP Version: 5.2SVN-2011-01-19 (snap) -Assigned To: +Assigned To: philip Block user comment: N Private report: N New Comment: Thanks for the report, this has been documented and will show up online this upcoming Friday. Summary: offset does not work with remote files. Previous Comments: ------------------------------------------------------------------------ [2011-01-26 21:38:30] philip@php.net Automatic comment from SVN on behalf of philip Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=307767 Log: - Document that the offset parameter does not work with remote files - Mentioned when file_get_contents() emits E_WARNING errors - Closes PHP Bug #53790 - Deals with PHP Bug #46043 ------------------------------------------------------------------------ [2011-01-26 20:27:49] cataphract@php.net I'm reopening as I didn't notice this was a doc bug. ------------------------------------------------------------------------ [2011-01-26 20:05:06] cataphract@php.net Duplicate of bug #46043. ------------------------------------------------------------------------ [2011-01-19 15:42:46] fx4084 at gmail dot com Description: ------------ file_get_contents ( string filename [, bool use_include_path [, resource context [, int offset [, int maxlen]]]] ) I user this function like: $fp = file_get_contents("http://www.example.com",0,NULL,3322,1024); But, run this programe I get two warning: Warning: file_get_contents() [function.file-get-contents]: stream does not support seeking in H:\htdocs\afx\media\games\index.php on line 5 Warning: file_get_contents() [function.file-get-contents]: Failed to seek to position 3322 in the stream in H:\htdocs\afx\media\games\index.php on line 5 I try it, The fourth parameter must less than 3322, why? Someone can tell me? Test script: --------------- <?php //Example $url = 'http://www.php.net'; $fp = file_get_contents($url,0,null,3321,1024); //No Warning. $fp = file_get_contents($url,0,null,3322,1024); //Warning!! Just difference between 3322 and 3321 //I need to be a greater number. How can I do? ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53790&edit=1

« previous php.doc.bugs (#5869) next »