php mkdir() function creates folders and permission settings

WBOY
Release: 2016-07-25 08:52:58
Original
1465 people have browsed it
  1. mkdir('./aa/',0777);
Copy code

Analysis and test results: 1. The directory permissions specified by the mkdir function can only be less than or equal to the default permissions set by the system umask. For example, the default umask of Linux is generally 0022, that is, the default permission for creating a directory is 0755, so at this time php mkdir('./aa/',0777) gets the permission of the directory to be 0755.

For linxu umask content, please refer to:

  • Linux file and directory default permissions (umask)
  • linux umask command usage example
  • linux umask command-default file permission mask
  • About the usage of linux UMASK

Example:

  1. mkdir('./xw/');
  2. chmod('./xw/',0777);
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template