Login   Register  
PHP Classes
elePHPant
Icontem

File: linecount_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jake M  >  LineCount  >  linecount_example.php  >  Download  
File: linecount_example.php
Role: Example script
Content type: text/plain
Description: an example
Class: LineCount
Calculates the total lines of code in a directory
Author: By
Last change:
Date: 2003-04-24 11:05
Size: 647 bytes
 

Contents

Class file image Download
<? include("class.lineCount.php"); ?>
<HTML>
<HEAD>
    <TITLE>Source Code Count</TITLE>
</HEAD>


<BODY BGCOLOR="#FFFFFF">

<?

    $lineCount 
= new lineCount;


    
// If no directory is given, it will use the directory of the script

        
$lineCount->dir="/path/to/files";



    
// Use this method to output the summary and list of files to the page
    // You can customize the HTML from within the class

        
$lineCount->summary(1);



    
// Use this method to get the totals as an associative array:

        
$totals $lineCount->summary(0);

        
# echo $totals["folders"] / $totals["files"] / $totals["lines"]

?>


</BODY>
</HTML>