Forum Moderators: coopster
<?
function display($dir) {
$d = dir($dir);
while ($f = $d->read()) {
if(($f!= ".") && ($f!= "..")) {
if(is_dir($f)) {
$ds = $dir.$f."/";
$innerstuff = display($ds);
$html .= $innerstuff;
}else{
$html .= "<tr><td>".$dir.$f."</td><td>".filesize($dir.$f)."</td></tr>\n";
}
}
}
return $html;
}
echo "<table width=80% cols=2>\n";
$stuff = display("./");
echo $stuff;
echo "</table>\n";
?>
just drop it in the root and call it in a browser