Superwormy,
thanks for your help. I have one more question. Here is my code
if ($handle = opendir('/')) {
echo "Directory handle: $handle\n";
echo "Files:\n";
/* This is the correct way to loop over the directory. */
while (false !== ($file = readdir($handle))) {
$file_modified = filemtime($file);
echo "$file and Modified on: $file_modified" ; ?> <br> <?php
}
closedir($handle);
}
The output is good for the . and .. only. Any other filename produces a warning.
Directory handle: Resource id #1 Files: . and Modified on: 1054046273
.. and Modified on: 1054037944
Warning: stat failed for lost+found (errno=2 - No such file or directory) in /var/www/html/main/update.php on line 15
lost+found and Modified on: