PHP chmod function Tutorial _php Tutorial

Source: Internet
Author: User
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 ...

  • 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.