peter2001
asked on
fileperms decoct gives wrong value
hi
am stuck when tring to find the chmod value of a file its giving me a strange number
this is the code am using
echo decoct(fileperms($baseDir . '/' . myfile.php') ) ; //this is set to 644 octal is 1204
which gives me 100644
then when i try to take away the 10000 to leave 644 it gives me this 55224
heres the code i use
echo decoct(fileperms($baseDir . '/' . myfile.php')- 10000 ) ;
any ideas why its not showing 644 when i take the 10000 away?
regards pete
am stuck when tring to find the chmod value of a file its giving me a strange number
this is the code am using
echo decoct(fileperms($baseDir . '/' . myfile.php') ) ; //this is set to 644 octal is 1204
which gives me 100644
then when i try to take away the 10000 to leave 644 it gives me this 55224
heres the code i use
echo decoct(fileperms($baseDir . '/' . myfile.php')- 10000 ) ;
any ideas why its not showing 644 when i take the 10000 away?
regards pete
or try to trim the string and cut the first 3 chars.
substr(decoct(fileperms($y ourfile)), -3);
substr(decoct(fileperms($y
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
http://php.oregonstate.edu/manual/en/function.fileperms.php