PHP List file directory tree A method, you can also determine whether its files are directories, the files in its directory clearly displayed, can help us to understand the directory of the situation, you can quickly see how many directories in this directory, which is not a directory file, is a more practical a small method, It can be applied to the PHP file management system, help us to list the file directory tree, an eye to understand, will its files perfect, is a good management directory of PHP files, the source code is as follows:
"; while (false!== ($entry = $Ld->read ())) { $checkdir = $dirname. " /". $entry; if (Is_dir ($checkdir) &&!preg_match ("[^\.]", $entry)) { echo "
". $checkdir." Current is directory
"; Listdir ($checkdir); } else{ echo "
". $entry." Not currently a directory
"; } } $Ld->close (); echo ""; } ? >
The above describes the PHP list file directory tree, including PHP, directory content, I hope that the PHP tutorial interested in a friend helpful.