jasonc Posted April 14, 2008 Share Posted April 14, 2008 strange i know but I wish to know how many lines are in all of my scripts i have created. some files are in folders and some are in folders within folders. i have tried to select all and view properties on my pc but that only showed that i have 275 files. i have thought maybe the only way is to do this online, using php and reading the files on the server. has anyone done this or know of a way to do this. please advise an easy way i can try first. thanks in advance for your help. Link to comment https://forums.phpfreaks.com/topic/101086-how-can-i-count-number-of-lines-in-all-of-my-php-scripts/ Share on other sites More sharing options...
chigley Posted April 14, 2008 Share Posted April 14, 2008 You'd have to use readdir() to loop through your files, then use a count() of the number of lines returned by the file() function. Have a ready Link to comment https://forums.phpfreaks.com/topic/101086-how-can-i-count-number-of-lines-in-all-of-my-php-scripts/#findComment-516927 Share on other sites More sharing options...
ucffool Posted April 15, 2008 Share Posted April 15, 2008 Or a combination of scandir(), file_get_contents(), and count(). Link to comment https://forums.phpfreaks.com/topic/101086-how-can-i-count-number-of-lines-in-all-of-my-php-scripts/#findComment-517416 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.