Chr*_*heD 14
function newest($a, $b)
{
return filemtime($a) - filemtime($b);
}
$dir = glob('files/*'); // put all files in an array
uasort($dir, "newest"); // sort the array by calling newest()
foreach($dir as $file)
{
echo basename($file).'<br />';
}
Run Code Online (Sandbox Code Playgroud)
信用就在这里.
| 归档时间: |
|
| 查看次数: |
5378 次 |
| 最近记录: |