Ret i script, til at kigge på e:
scriptet ligger på c: men skal kigge og liste filerne på e:/filer-------------------
<?
function list_dir($dir)
{
$handle=opendir($dir);
echo "<ul>";
while ($file = readdir($handle))
{
if ($file != '.' && $file != '..')
print ("<li><a
href=\"".$GLOBALS["path"].$file."\">".$file."</a>");
if (is_dir($file) && $file != '.' && $file != '..')
{
$toto = $GLOBALS["path"];
$GLOBALS["path"] .= $file."/";
chdir ($file);
list_dir(".");
$GLOBALS["path"] = $toto;
chdir ("..");
}
}
echo "</ul>";
closedir($handle);
}
$directory = "tommz";
$GLOBALS["path"] = "http://".$HTTP_HOST."/".$directory."/";
list_dir(".");
?>
