Click here to Skip to main content
15,905,232 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi does anybody know a script or something that count your TOTAL lines of code so i can display it on my site:)

im using netbeans 7.4
Posted
Updated 11-Mar-14 1:03am
v2

My lines of code are countless.
 
Share this answer
 
https://code.google.com/p/php-line-counter/[^]

PHP
$options = array(
    'ignoreFolders' => explode(', ', '.svn, nbproject'),
    'ignoreFiles' => explode(', ', 'jquery-1.5.js, jquery-1.5.min.js'),
    'extensions' => explode(', ', 'php, js'),
    'whitespace' => false,
    'comments' => false,
);

//Scan user defined directory
$folder = new Folder('path/to/project', new Option($options));
$folder->init();

$lines = $folder->getLines();
$whitespace = $folder->getWhitespace();
$comments = $folder->getComments();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900