PHP chmod defines and uses the Chmod property () function to change the permissions of the specified file if it returns True and False fails successfully.
PHP chmod definition and usage
The Chmod property () function changes the permissions of the specified file if it returns True and False fails successfully.
Grammar
chmod (File,mode)
File |
Required. The specified file check |
Mode |
Required. Specifies the new permission. The mode of the parameter consists of four numbers: one is the owner of the permission specified by the number of the second digit is always the third number of permissions that are prescribed by the owner of the user group fourth certain permissions other people may value (set multiple permissions, add the following number): 1 = Execute permission 2 = Write permission 4 = Read permission |
Let's take a look at the examples below.
Read and write for owner, none for read-write person, no for other chmod ("Test.txt", 0600);/Read and write for read-write master, read others
chmod ("Test.txt", 0644);//Everything for everything the owner reads and executes the other person
chmod ("Test.txt", 0755);//Everything for everything for people, read the group of owners
http://www.bkjia.com/PHPjc/445507.html www.bkjia.com true http://www.bkjia.com/PHPjc/445507.html techarticle php chmod defines and uses the Chmod property () function to change the permissions of the specified file if it returns True and False fails successfully. PHP chmod definition and Usage chmod property () function Change ...