The directory functions enable you to obtain information about directories and their contents.
The PHP directory functions are built into the PHP core, so no additional installation is needed to use them.
Function |
Description |
chdir() |
Changes the current working directory. |
chroot() |
Changes the root directory. |
closedir() |
Closes a directory handle. |
dir() |
Returns an instance of the |
getcwd() |
Returns the current working directory. |
opendir() |
Opens a directory handle. |
readdir() |
Returns an entry from a directory handle. |
rewinddir() |
Resets a directory handle. |
scandir() |
Returns an array of files and directories within a specified directory. |