note 49526 added to function.umask
| From: | trisk at earthling dot net | Date: | Mon, 31 Jan 2005 17:25:57 +0000 |
| Subject: | note 49526 added to function.umask | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-84278@lists.php.net to get a copy of this message | ||
I thought I would clarify the numbering scheme used here, as it confused me at first.
On the UNIX console, the command:
umask "blah"
In this instance, the umask command forces "blah" to be an octal number, regardless of how
many digits you use and regardless of any leading zeroes. In PHP, umask() does not default to octal
as the console command does, it uses whatever numeric format you specify.
For example:
umask(213);
This uses the decimal integer 213 and not the octal number 213 as you would expect when using the
console command. In this case, it would set the umask to the octal number "325".
To enter the number as octal, just add one or more zeroes to the left of the number:
umask(0213);
umask(07);
umask(0044);
etc.
----
Manual Page -- http://www.php.net/manual/en/function.umask.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49526
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49526&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49526&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49526&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49526&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49526&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49526&report=yes
Search -- http://master.php.net/manage/user-notes.php