chichi já to nestudoval, myslel jsem že má tohle, protože to také používám
<?php
$ces = getcwd();
$adr = array_pop(explode("./", $ces));
?>
<?
$nas_sou="index.php";
$handle=opendir('.');
$i=0;
while($file=readdir($handle))
{
$ftime[filemtime($file)] = $file;
}
krsort($ftime,1); //sestupne razeni
foreach ($ftime as $file)
{
if ($file != "." && $file != ".." && !is_dir($file)&&$file!=$nas_sou)
{
$soubor[]=$file;
$velikost[]=round((filesize($file)/1024/1024),3);
$zmena[]=date("j.m.Y ",filemtime($file));
}
}
closedir($handle);
function vypis($s,$v,$z)
{
echo "<table>\n";
for($i=0;$i<count($s);$i++)
{
echo "<tr><td>";
echo "<a href=\"".$s[$i]."\">".$s[$i]."</a> ";
echo "$v[$i] MB <font size=-1>(";
echo "$z[$i])</font>";
echo "</td></tr>\n";
}
echo "</table>\n";
}
vypis($soubor,$velikost,$zmena);
?>