How to create directory dynamically

If You want to create dynamic folder in your directory with PHP.In this post we will provide how to create folder inside folder in php, hear for how to create directory and file in php I will give you example.In this post we will learn about Create Dynamic Directories with an example.

Here are some example for create dynamic folder like that…


mkdir(path, mode, recursive, context);

 $Floder_NAME = date('Y');
      if (!is_dir('assets/user/' . $Floder_NAME)) {
            mkdir('assets/user/' . $Floder_NAME, 0777, TRUE);
            chmod('assets/user/' . $Floder_NAME, 0777);

File Permissions type:-

0: No permission
1: Execute
2: Write
3: Write and Execute
4: Read
5: Read and Execute
6: Read and Write
7: Read, Write, and Execute

Classes. There are three type of permissions Such as : an Owner, a Group (who all share the same permissions), and Others.

The second number specifies permissions for the owner.
The third number specifies permissions for the owner’s user group.
The fourth number specifies permissions for every.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Back to top button