PHP Number of lines in a text file – PHP August 9, 2011 Pramod T P Leave a comment <?php $fp = “test.txt”; $number = count(file($fp)); echo ” $number lines “; ?>