I have a text log file, about 600 MB.
I want to read it using php and display the data on a html page, but I only need the last 18 lines that were added each time I
For the record, had the same problem and tried every solution here.
Turns out Dagon's popen "tac $filename" way is the fastest and the one with the lowest memory and CPU loads.
$filename
Tested with a 2Gb log-file reading 500, 1000 and 2000 lines each time. Smooth. Thank you.