note 79499 deleted from function.filectime by tularis
| From: | tularis@php.net | Date: | Fri, 30 Nov 2007 12:20:27 +0000 |
| Subject: | note 79499 deleted from function.filectime by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-132691@lists.php.net to get a copy of this message | ||
Note Submitter: simra[NOSPAM]mac.com
----
This is another way to get a list of files ordered by upload time:
<?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 />';
}
?>