chmod () function changes the file mode.
If successful it returns TRUE, otherwise returns FALSE.
example
? < PHP // owner can read and write, others do not have any permissions chmod ( " test.txt " , 0600 ); // owner can read and write, others read chmod ( " test.txt " , 0644 ); // owner has all the privileges, read and execute everyone else chmod ( " test.txt " , 0755 ); // owner has all the permissions, the owner's group readable chmod ( " test.txt " , 0740 ); ?>
reference:
https://www.w3school.com.cn/php/func_filesystem_chmod.asp