PHP readdir() Function

PHP Directory Reference : List all entries in the images directory, then close

Definition and Usage

The readdir() function returns the name of the next entry in a directory.

Syntax

readdir(dir)

Parameter Values

Parameter Description
dir Optional. Specifies the directory handle resource previously opened with opendir(). If this parameter is not specified, the last link opened by opendir() is assumed

Technical Details

Return Value: The entry name (filename) on success, FALSE on failure
PHP Version: 4.0+

❮ PHP Directory Reference