The opendir() function opens a directory handle.
resource opendir ( string $path [, resource $context ] )
Opens up a directory handle to be used in subsequent closedir(), readdir(), and rewinddir() calls.The above example will output something similar to:
filename: . : filetype: dir filename: .. : filetype: dir filename: apache : filetype: dir filename: cgi : filetype: dir filename: cli : filetype: dir
Parameter | Description |
---|---|
path | Required. Specifies the directory path to be opened |
context | Optional. Specifies the context of the directory handle. Context is a set of options that can modify the behavior of a stream |