";
echo "Time ... " .time();
//if( $num_files == 2)
//{
$days = 2;
if ($handle = opendir($directory))
{
while (false !== ($file = readdir($handle)))
{
$pos = strpos( $file, '.' );
if ($file != "." && $file != ".." && is_numeric($pos) )
{
$filelastmodified = filemtime($directory ."/" .$file);
//if(is_file($filelastmodified))
//{
echo " === " .$filelastmodified ." " .$file;
echo "
";
if((time() - $filelastmodified) > $days*24*3600)
{
if(is_file($path . $file))
{
// unlink($path . $file);
echo "efface " .$filelastmodified;
echo "
";
}
}
else
{
echo "trop resent " .$filelastmodified;
echo "
";
}
//}
}
}
closedir($handle);
}
//}
?>