How can I check file permissions
, without having to run operating system specific command via passthru()
or exec()
?
How can I check file permissions
, without having to run operating system specific command via passthru()
or exec()
?
Use fileperms() function
clearstatcache();
echo substr(sprintf('%o', fileperms('/etc/passwd')), -4);