PHPerKaigi 2024

Directory::read

(PHP 4, PHP 5, PHP 7, PHP 8)

Directory::readRead entry from directory handle

Description

public Directory::read(): string|false

Changelog

Version Description
8.0.0 No parameter is accepted. Previously, a directory handle could be passed as argument.
add a note

User Contributed Notes 1 note

up
1
cjcxxh at 163 dot com
11 months ago
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.
To Top