PHP mkdir () function Create folder and permission settings

Source: Internet
Author: User
  1. mkdir ('./aa/', 0777);
Copy Code

Analysis and test results: The 1,mkdir function specifies a directory permission that is less than or equal to the default permissions set by the system umask. such as the Linux default Umask general 0022, that is, the default permission to create a directory is 0755, so php mkdir ('./aa/', 0777) the permission to get the directory is 0755.

For Linxu umask content, please refer to:

  • Linux file and directory default permissions (Umask)
  • Examples of Linux umask command usage
  • Linux umask command-preset file permission mask
  • About the use of Linux Umask

Example:

  1. mkdir ('./xw/');
  2. chmod ('./xw/', 0777);
Copy Code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.