[Solved] Printed config value log_file_permissions equal to 420? |
Hello
when I run the code below the output is 420, while my permissions are 0644 in config.php. PHP Code: print $this->config->item('log_file_permissions'); I looked through the code but can't get to understand how this works. Context: I'm creating an ini file to save my config settings there and I just encountered this. When I change to 0700 for example it outputs 448. I need to save it as 0644. I'm convinced there's just something I don't know about or understand. Thank you
The leading 0 causes PHP to interpret the value as an octal number.
0700 octal is 448 decimal 0644 octal is 420 decimal
0644 is simply written using octal notation.
420 is the same value, only presented as decimal. It doesn't matter which one you write, unless you're saving it as a string (which would be wrong to begin with). https://secure.php.net/integer
Great thanks, I used decoct() to make it visually correct.
|
Welcome Guest, Not a member yet? Register Sign In |