目录迭代器
$dir = new DirectoryIterator(dirname(__FILE__)); foreach ($dir as $fileinfo) { if (!$fileinfo->isDot()) { echo $fileinfo->getFilename().‘<br />‘; } }
输出当前非dot的所有目录名称和文件名
http://www.php.net/manual/en/directoryiterator.construct.php
DirectoryIterator
时间: 2024-10-14 19:02:57