¡@

Home 

php Programming Glossary: linecount

Efficiently counting the number of lines of a text file. (200mb+)

http://stackoverflow.com/questions/2162497/efficiently-counting-the-number-of-lines-of-a-text-file-200mb

doesn't load the whole file into memory file largefile.txt linecount 0 handle fopen file r while feof handle line fgets handle linecount.. 0 handle fopen file r while feof handle line fgets handle linecount fclose handle echo linecount fgets loads a single line into.. feof handle line fgets handle linecount fclose handle echo linecount fgets loads a single line into memory if the second argument..