Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

PHP | Directory Functions



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.

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.

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.NoFunction & DescriptionPHP
1chdir()

Changes current directory

4
2chroot()

Change the root directory

4.0.4
3dir()

Opens a directory handle and returns an object.

4
4closedir()

Closes a directory

4
5getcwd()

Gets the current working directory.

4
6opendir()

Open directory handle

4
7readdir()

Read entry from directory handle

4
8rewinddir()

Rewind directory handle

4
9scandir()

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.NoConstant & DescriptionPHP
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.


This post first appeared on Web Design Tutorialz, please read the originial post: here

Share the post

PHP | Directory Functions

×

Subscribe to Web Design Tutorialz

Get updates delivered right to your inbox!

Thank you for your subscription

×