I currently got the following code
glob(*.php)
foreach ($files as $files..)
$content = file_get_contents($file);
$cnt=count(explode("\n", $content))
$linecount += $cnt;
echo $linecount
I have a folder with .css, .html, .js and .php files in it. Now I would like to count all the lines of code I got int he files there. How can I do this?
I found this one here How to count all the lines of code in a directory recursively?
But it didn't really help me, because it seemed like you do what they did in a Linux shell. Any ideas?