Ok I put together this script which goes through and prints the html pages in this one directory. Can someone please help me add another loop that would go through the directory and check if there are other directories within that and just go through and print out all of the html files in all of the dirs? Any help would be soo soo appreciated.
Thanks!
phpdino
<?php
$count = 0;
// set directory name
$dir = "/web/help/";
// open directory and parse file list
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($filename = readdir($dh)) !== false)
{
$fullpath = $dir . $filename;
if (($filename != ".") && ($filename != "..") && is_file($fullpath) && is_readable($fullpath))
{
$file = fopen($fullpath, "r");
$contents = fread($file, filesize($fullpath));
fclose($file);
print $contents;
}
}
// close directory
closedir($dh);
}
}
echo "-- $count FILES FOUND --";
?>