opendir

mixed opendir(string dir) 

Returns a resource pointer for use by the readdir() , rewinddir() , or closedir() functions.

Returns:

Resource pointer on success; FALSE on error

Description:

opendir() opens directory dir and returns a resource pointer to a read-only directory stream. (The term stream refers to a communication channel to a file, process, or device.) The resource pointer is used by readdir(), rewinddir(), and closedir() to manipulate the directory stream.

The function returns FALSE if the open_basedir configuration directive is set and directory dir is not below a directory specified in open_basedir. FALSE is also returned if a directory stream for the directory could not be opened.

Note:

If opendir() fails because a directory ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.