Return to Snippet

Revision: 22279
at January 7, 2010 13:01 by fackz


Initial Code
<?php
foreach (glob("../downloads/*") as $path) { //configure path
    $docs[filectime($path)] = $path;
} ksort($docs); // sort by key (timestamp)

foreach ($docs as $timestamp => $path) {
    print date("d. M. Y: ", $timestamp);
    print '<a href="'. $path .'">'. basename($path) .'</a><br />';
}
?>

Initial URL


Initial Description
This is another way to get a list of files ordered by upload time.

Initial Title
get a list of files ordered by upload time

Initial Tags
list, files

Initial Language
PHP