Count Lines In File

Description: Count the number of lines in a text file.

<?PHP
 
$file = "somefile.txt";
$lines = COUNT(FILE($file));
ECHO "There are $lines lines in $file";
 
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.