I am trying to get the last modification date of all files in a directory using PHP.
I am using this:
foreach($dir as $file)
{
$mod_date=date("F d Y H:i:s.", filemtime($file));
}
foreach($dir as $file) is returning the correct files, but all of the modification dates are coming back as 0000-00-00 00:00:00, instead of the actual modification date.
What changes do I need to make to get this working?