I got this so far. It should show all the files in the directory.
How do I get it to count everything, cept the .html and .php files ?
This script only shows all the .swf files in a directory.
<?
$imageDir = "./";
$fileCount = 0;
if (is_dir($imageDir) && $directoryPointer = @opendir($imageDir)) {
while ($oneFile = readdir($directoryPointer)) {
$thisFileType = strtolower(substr(strrchr($oneFile, "."), 1));
if ( $thisFileType == "swf" || $thisFileType == "swf" || $thisFileType == "swf") {
$fileCount++;
}
}
} else {
$fileCount = -1;
}
echo $fileCount;
?>