Retrieve the current umask.
<?php $file = “test.txt”; echo (umask()); ?> |
The umask() function sets the file creation mask to mask & 0777 and returns the previous umask.
umask(mask) |
Parameter |
Description |
mask |
Optional. Specifies the new permissions. Default is 0777 The mask parameter consists of four numbers:
Possible values (to set multiple permissions, add up the following numbers):
4 = read permissions |
Return Value: |
If you call |
PHP Version: |
4.0+ |