Changes the permissions of a file.
The chmod() function changes the permissions of a file. See fileperms() for more information about permission encoding. TRUE is returned on success. If an error occurs, FALSE is returned.
<?php
if (chmod("file.txt", 0600)) {
print "File permissions changed";
}
?> File permissions changedThe permissions of a file are set to read and write for the owner, and no permissions for group and others.