Hi there people of the forum!
I have this code, just trialling at the moment, but I can't seem to get it to throw the else clause even if I manually change the file permissions. Or is there a better way to check to see if the file permissions fall between a range of octal numbers?
code:-
if(substr(sprintf('%o', fileperms("path/to/file.html")), -4) == "0666" || "0775" || "0776" || "0777"){
echo "file is writeable";
}
else{
echo "file is not writeable";
}
Thanks for any help or suggestions.
Cheers,
MRb