set_readonly
set_readonly($path,$on=true); - this function is used to change the READONLY attribute of the specified file
The function accepts parameters as input:
$path – path to the file that we want to change the attribute (string) for. It can be either absolute or relative (relative to the script folder).
$on – flag for the attribute, if true, the attribute will be set, and if false - unchecked (boolean).
After testing, the function returns the result of its work to the script :
true – successfully changed (boolean) false – there is no such file (boolean)