Hello dear readers! welcome back to another edition of our tutorial on PHP. In this tutorial guide, we are going to be discussing about the PHP Directory Functions.
The Php Directory Functions are used in manipulating any directory.
The Php Directory Functions are used in manipulating any directory.
Installation
There is no Installation needed to use these functions; they are part of the PHP core.
PHP needs to be configured with the --enable-chroot-function option to enable chroot() function.
PHP needs to be configured with the --enable-chroot-function option to enable chroot() function.
READ: PHP | Deque Functions
Runtime Configuration
This PHP extension type has no configuration directives defined in php.in.
List of Directory Functions
The following below is the list of directory functions supported in PHP. PHP - indicates the earliest versions of PHP that have support for the functions.
Sr.No | Function & Description | PHP |
---|---|---|
1 | chdir() Changes current directory | 4 |
2 | chroot() Change the root directory | 4.0.4 |
3 | dir() Opens a directory handle and returns an object. | 4 |
4 | closedir() Closes a directory | 4 |
5 | getcwd() Gets the current working directory. | 4 |
6 | opendir() Open directory handle | 4 |
7 | readdir() Read entry from directory handle | 4 |
8 | rewinddir() Rewind directory handle | 4 |
9 | scandir() List files and directories inside the specified path |
In our subsequent tutorials, we are going to be discussing about the above listed functions.
Directory Constants
The following below is the list of directory constants supported in PHP. PHP - indicates the earliest versions of PHP that have support for these constants.
Sr.No | Constant & Description | PHP |
---|---|---|
1 | DIRECTORY_SEPARATOR | 3 |
2 | PATH_SEPARATOR | 4 |
READ: PHP Calendar Functions
Alright guys! This is where we are rounding up for this tutorial post. In our next tutorial guide, we are going to be discussing about PHP chdir() Function.
Do feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.
Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.
Thanks for reading and bye for now.
Do feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.
Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.
Thanks for reading and bye for now.