Hmm, war eigentlich ganz einfach:
PHP
<?php
$newestfolder = "20090806";
if ($handle = opendir('.'))
{
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != ".." && $file != "index.php" )
{
if ($file > $newestfolder)
{
$newestfolder = $file;
}
}
}
}
$dir = "$newestfolder/";
$d_open = opendir($dir);
$a=0;
while($file = readdir($d_open))
{
$arr_pic[$a]['file'] = $file;
$arr_pic[$a]['date'] = filectime($dir."/".$file);
}
$a++;
for($a=0;$a<count($arr_pic);$a++)
{
$s[] = $arr_pic[$a]['date'];
}
array_multisort($s,SORT_DESC,$arr_pic);
echo '<img src="'.$dir.'/'.$arr_pic[0]['file'].'" />';
closedir();
?>
Alles anzeigen