I have this script I gathered from this forum and modified it to list the time a file was last modified.
The only problem is that it is not returning any times for the files' last modified or change time.
Can someone look at this and help? Thanks.
<?
This function opens a directory, and prints a
function parse_dir($dir,$level){
print "<b>".$dir."(DIR)</b><BR>\n";
$dp=opendir($dir);
while (false!=($file=readdir($dp))){
if ($file!="." && $file!=".."){
if (is_dir($dir."/".$file))
{
parse_dir($dir."/".$file,$level+1);
}
else
{
$lastchanged = filemtime($file);
$changeddate = date("M/d/Y h:i:s a", $lastchanged);
print "<font size=-1> /".$file." - $lastchanged </font><BR>\n";
}
}
}
}
$start_dir="/viny/nyintranet/gallery";
$level=1;
parse_dir($start_dir,$level);
?>