<?php
echo '<html>';
$ignore = array('.', '..', 'index.php');
$files = array();
foreach (scandir($dir) as $file) {
if (in_array($file, $ignore)) {
continue;
}
$files[$file] = filemtime($dir . '/' . $file);
}
arsort($files);
$keys = array_keys($files);
foreach ($files as $key => $value) {
echo date('r', $value), ' <a href="', $dir, '/', $key, '">', $key, '</a><br/>';
}
echo 'Done';
echo '</html>';
?>
This post is also available in: Αγγλικα