set_time_limit(0);
header('Content-type: text/html; charset=windows-1254');
function listele ($dizin)
{
# Slash
# ----------------------
$slash = "/";
# Dizinimize Geçelim
# ----------------------
$dir = dir($dizin);
# Dizinimizi Okuyalım
# ----------------------
while ($x = $dir->read())
{
if ($x != "." && $x != "..")
{
if (is_dir($dizin.$slash.$x))
{
echo $dizin.$slash.$x.$slash.'
';
listele($dizin.$slash.$x);
}
else
{
if ($x != "." && $x != "..")
{
echo ' '.$x.'
';
}
}
}
}
$dir->close();
}
listele($_SERVER['DOCUMENT_ROOT']);
?>