PHP simple way to get a list of directories, PHP get directory list
This article describes a simple way to get a list of directories in PHP. Share to everyone for your reference. The implementation method is as follows:
<?php function List_directory_content ($dir) { if (Is_dir ($dir)) { if ($handle = Opendir ($dir)) {while ( $file = Readdir ($handle))!== false) { if ($file! = ') ' && $file! = ': ' && $file! = '. htaccess ') { E Cho ' . $file. '
'." \ n "; } } Closedir ($handle); } } }?>
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/972627.html www.bkjia.com true http://www.bkjia.com/PHPjc/972627.html techarticle php Simple way to get a list of directories, PHP get directory list This article describes the PHP simple way to get a list of directories. Share to everyone for your reference. The concrete implementation method is as follows: ...