'; foreach($list as $file){ $target = "$dir/$file"; ...">
$dir = "D:\workspace"; function list_file($dir = '.'){ $list = scandir($dir); echo ''; foreach($list as $file){ $target = "$dir/$file"; if ( is_dir($target) && $file != '.' && $file != '..' ){ echo "
'; } list_file($dir);- $file
"; list_file($target); } else if ( $file != '.' && $file != '..'){ echo "- $file
"; } } echo '