scbookz Posted August 2, 2009 Share Posted August 2, 2009 file_get_contents ( string $filename [, int $flags= 0 [, resource $context [, int $offset= -1 [, int $maxlen= -1 ]]]] ) i want to start getting content down the line not at the beginning anyone have an example? Link to comment https://forums.phpfreaks.com/topic/168484-can-someone-explain-how-offset-works-on-this-function/ Share on other sites More sharing options...
phpSensei Posted August 2, 2009 Share Posted August 2, 2009 edit: you would have to use php file system functions, much easier and faster Link to comment https://forums.phpfreaks.com/topic/168484-can-someone-explain-how-offset-works-on-this-function/#findComment-888780 Share on other sites More sharing options...
Daniel0 Posted August 2, 2009 Share Posted August 2, 2009 file_get_contents Link to comment https://forums.phpfreaks.com/topic/168484-can-someone-explain-how-offset-works-on-this-function/#findComment-888781 Share on other sites More sharing options...
phpSensei Posted August 2, 2009 Share Posted August 2, 2009 file_get_contents lol. I understood he wants to know how OFFSET works. not sure. OP can you explain what you are trying to do? Link to comment https://forums.phpfreaks.com/topic/168484-can-someone-explain-how-offset-works-on-this-function/#findComment-888782 Share on other sites More sharing options...
phpSensei Posted August 2, 2009 Share Posted August 2, 2009 <?php // Read 14 characters starting from the 21st character $section = file_get_contents('./people.txt', NULL, NULL, 20, 14); var_dump($section); ?> Link to comment https://forums.phpfreaks.com/topic/168484-can-someone-explain-how-offset-works-on-this-function/#findComment-888787 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.