Read a file from line X to line Y ?
Posted
by thedp
on Stack Overflow
See other posts from Stack Overflow
or by thedp
Published on 2010-05-11T06:49:13Z
Indexed on
2010/05/11
6:54 UTC
Read the original article
Hit count: 212
Hello,
Is there a way to read a file in PHP5 from line X to line Y into a string, without reading the entire file.
I would like to return huge files (10,000+ lines) using ajax requests. Each request will provide the client with additional lines. And due to the fact that the file can reach large sizes, I would like to avoid reading it whole over and over again.
Thank you.
© Stack Overflow or respective owner