PHP umask()Functions
Complete PHP Filesystem Reference Manual
Definition and Usage
The umask() function changes the file permissions of a file.
This function sets PHP's umask tomask& 0777 and returns the previous umask. However, if you call umask() without parameters, it returns the current umask.
Syntax
umask(mask)
| Parameters | Description |
|---|---|
| mask | Optional. Specifies the new permission. Default is 0777. The mask parameter consists of four numbers:
Possible values (to set multiple permissions, add the following numbers together):
|
Complete PHP Filesystem Reference Manual Other Extensions