Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

fileperms decoct gives wrong value


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

  • 3
1 Solution
AlexSoftware EngineerCommented:
try to read this manual maybe will help you.
AlexSoftware EngineerCommented:
or try to trim the string and cut the first 3 chars.

AlexSoftware EngineerCommented:
peter2001Author Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now