May 11, 2021 PHP
In this section, you'll learn about PHP5's directory function: the Directory function.
The Directory function allows you to get information about the directory and its contents.
The PHP Directory function is part of the PHP core. These functions can be used without installation.
function | describe |
---|---|
chdir() | Change the current directory. |
chroot() | Change the root directory. |
closedir() | Close the directory handle. |
dir() | Returns an instance of the Directory class. |
getcwd() | Returns the current working directory. |
opendir() | Open the directory handle. |
readdir() | Returns the entry in the directory handle. |
rewinddir() | Reset the directory segment. |
scandir() | Returns an array of files and directories in the specified directory. |
With the Directory function, you can easily get information about the directory, and then you'll learn about PHP's Error and Logging functions!