note 86478 added to function.readfile
| From: | levhita at gmail dot com | Date: | Tue, 21 Oct 2008 19:59:45 +0000 |
| Subject: | note 86478 added to function.readfile | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145545@lists.php.net to get a copy of this message | ||
A note on the smartReadFile function from gaosipov:
Change the indexes on the preg_match matches to:
$begin = intval($matches[1]);
if( !empty($matches[2]) ) {
$end = intval($matches[2]);
}
Otherwise the $begin would be set to the entire section matched and the $end to what should be the
begin.
See preg_match for more details on this.
----
Server IP: 200.36.127.20
Probable Submitter: 200.77.33.199
----
Manual Page -- http://www.php.net/manual/en/function.readfile.php
Edit -- https://master.php.net/note/edit/86478
Del: integrated -- https://master.php.net/note/delete/86478/integrated
Del: useless -- https://master.php.net/note/delete/86478/useless
Del: bad code -- https://master.php.net/note/delete/86478/bad+code
Del: spam -- https://master.php.net/note/delete/86478/spam
Del: non-english -- https://master.php.net/note/delete/86478/non-english
Del: in docs -- https://master.php.net/note/delete/86478/in+docs
Del: other reasons-- https://master.php.net/note/delete/86478
Reject -- https://master.php.net/note/reject/86478
Search -- https://master.php.net/manage/user-notes.php