[Solved] Printed config value log_file_permissions equal to 420? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [Solved] Printed config value log_file_permissions equal to 420? (/showthread.php?tid=67699) |
[Solved] Printed config value log_file_permissions equal to 420? - raknjak - 03-28-2017 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 RE: Printed config value log_file_permissions equal to 420? - dave friend - 03-28-2017 The leading 0 causes PHP to interpret the value as an octal number. 0700 octal is 448 decimal 0644 octal is 420 decimal RE: Printed config value log_file_permissions equal to 420? - Narf - 03-28-2017 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 RE: [Solved] Printed config value log_file_permissions equal to 420? - raknjak - 03-28-2017 Great thanks, I used decoct() to make it visually correct. |