PHP Directory



Introduction to PHP Directory

The Directory function allows you to obtain information about a directory and its contents.


Installation

The PHP Directory function is an integral part of the PHP core. No installation is required to use these functions.


PHP 5 Directory Function

##chdir( )Change the current directory. chroot()Change the root directory. Close the directory handle. dir()Returns an instance of the Directory class. getcwd()Return to the current working directory. Open the directory handle. Returns the entry in the directory handle. Reset the directory handle. scandir()Returns an array of files and directories in the specified directory.
FunctionDescription
closedir()
opendir()
readdir()
rewinddir()