<?php
require_once 'estimator.class.php';
$pe = new ProjectEstimator();
$pe->root = 'C:/shttps/www/library/';
$pe->check_subdirs = true;
$pe->filters = array("#\.php#i");
$pe->getInfo(false);
echo '<b>Total number of files:</b> ' . $pe->total_files . '<br />';
echo '<b>Total number of lines:</b> ' . $pe->total_lines . '<br />';
echo '<b>Total number of characters:</b> ' . $pe->total_size . '<br />';
echo '<b>Total number of alphabetic characters:</b> ' . $pe->total_chars . '<br />';
echo '<b>Total size in bytes:</b> ' . $pe->total_size . '<br />';
echo '<br /><br />';
echo '<table border="1">';
echo '<tr>';
echo '<td width="350"><b>File name</b></td>';
echo '<td><b>Num. lines</b></td>';
echo '<td><b>Num. chars</b></td>';
echo '<td><b>File size</b></td>';
echo '</tr>';
foreach ($pe->files as $fname)
{
echo '<tr>';
echo '<td>' . $fname['file_name'] . '</td>';
echo '<td>' . $fname['num_lines'] . '</td>';
echo '<td>' . $fname['num_chars'] . '</td>';
echo '<td>' . $fname['file_size'] . '</td>';
echo '</tr>';
}
echo '</table>';
?>
|