Easy Tutorial
❮ Php Session Options Func Array Values ❯

PHP readdir() Function

PHP Directory Reference Manual

Example

Open a directory, read its contents, and then close it:

Result:


Definition and Usage

The readdir() function returns the filename of the next file in the directory.


Syntax

Parameter Description
dir_handle Optional. Specifies the directory handle previously opened by opendir()

Technical Details

Return Value: Returns the filename on success, FALSE on failure.
PHP Version: 4.0+
--- ---
❮ Php Session Options Func Array Values ❯