Created
April 18, 2011 13:50
-
-
Save edmondscommerce/925374 to your computer and use it in GitHub Desktop.
some snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$glob = glob('zblog/application/views/scripts/*'); | |
//var_dump($glob); | |
foreach ($glob as $g) { | |
if (!is_readable($g)) { | |
continue; | |
} | |
echo '<h1>' . $g . '</h1> | |
<table> | |
<tr><th>name</th><th>size</th><th>lines</th></tr>'; | |
$glob2 = glob($g . '/*'); | |
//var_dump($glob2); | |
foreach ($glob2 as $g2) { | |
if (!is_readable($g2)) { | |
continue; | |
} | |
if (is_dir($g2)) { | |
continue; | |
} | |
$name = basename($g2); | |
$size = filesize($g2); | |
$lines = count(file($g2)); | |
echo "<tr><td>$name</td><td>$size</td><td>$lines</td></tr>"; | |
} | |
echo '</table>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment