function dirList($dir_path = '') {
if(is_dir($dir_path)) {
$dirs = opendir($dir_path);
if($dirs) {
while(($file = readdir($dirs)) !== false) {
if($file !== '.' && $file !== '..') {
if(is_dir($dir_path.'/'.$file)) {
//echo $dir_path . '/' . $file . '
';
dirList($dir_path . '/' . $file);
} else {
echo $dir_path . '/' . $file . '
';
}
}
}
closedir($dirs);
}
} else {
echo '目录不存在!';
}
}
