use
while ($row=$dir->read()){
// your code
}
to get a list of all files and directories. You can definitely use the "for" and other loops.
(PHP 4, PHP 5, PHP 7, PHP 8)
Directory::read — 从目录句柄中读取条目
版本 | 说明 |
---|---|
8.0.0 | 不接受任何参数。在此之前,目录句柄可以作为参数传递。 |
use
while ($row=$dir->read()){
// your code
}
to get a list of all files and directories. You can definitely use the "for" and other loops.