<?php
set_time_limit(0);
function showDir($dir)
{
$handleSub = @opendir($dir) or die("Cannot open " . $dir);
while($file = readdir($handleSub))
{
if($file != "." && $file != ".." )
{
echo "<a href='./{$file}' target='_blank' >{$dir}/{$file} \t\n</a><br/>";
$full = "{$dir}/{$file}";
if(is_dir($full)){
showDir($full);
}
}
}
closedir($handleSub);
}
$dir = "./";
$handle = @opendir($dir) or die("Cannot open " . $dir);
while($file = readdir($handle)){
if($file != "." && $file != ".." ){
echo "<a href='./{$file}' target='_blank' >{$file} \t\n</a><br/>";
if(is_dir($file)){
showDir($file);
}
}
}
closedir($handle);