chmod
Change file mode
chmod()
function changes the file mode.
Return TRUE if successful, otherwise return FALSE.
<?php // The owner can read and write, and others do not have any permissions chmod ( "test.txt" , 0600 ) ; // The owner can read and write, and others can read chmod ( "test.txt" , 0644 ) ; // The owner has all permissions, which can be read and executed by everyone else chmod ( "test.txt" , 0755 ) ; // The owner has all permissions, and the group where the owner is located can be readable chmod ( "test.txt" , 0740 ) ; ?>
chmod ( file , mode )
parameter | describe |
---|---|
file | Required. Specify documents to be inspected. |
mode |
Optional. Specify new permissions. The mode parameter consists of 4 numbers:
Possible values (If you need to set multiple permissions, total the following numbers):
|