I want to change the file permissions to chmod('file',0755) but it is not working:
if(chmod("filepath",0755)){
$fp = fopen("filepath", "r+");
if (flock($fp, LOCK_EX)) { // acquire an exclusive lock
ftruncate($fp, 0); // truncate file
fwrite($fp, "Order no Synchronization\n");
fflush($fp);
flock($fp, LOCK_UN);
}
}
else{
echo "Not able to change permissions";
}
The above code is not working for me.