PHP umask() 函数

PHP 教程 · 2019-01-25 17:12:35

定义和用法

umask() 函数改变文件的文件权限。

该函数把 PHP 的 umask 设置为 mask & 0777 并返回原来的 umask。然而,如果您调用 umask() 时不带参数,则会返回当前的 umask。

语法


umask(mask)


参数 描述
mask 可选。规定新的权限。默认是 0777。

mask 参数由四个数字组成:

  • 第一个数字通常是 0
  • 第二个数字规定所有者的权限
  • 第三个数字规定所有者所属的用户组的权限
  • 第四个数字规定其他所有人的权限

可能的值(如需设置多个权限,请对下面的数字进行总计):

  • 1 = 执行权限
  • 2 = 写权限
  • 4 = 读权限

点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

The Art of Computer Programming, Volume 4,  Fascicle 3

The Art of Computer Programming, Volume 4, Fascicle 3

Donald E. Knuth / Addison-Wesley Professional / 2005-08-05 / USD 19.99

Finally, after a wait of more than thirty-five years, the first part of Volume 4 is at last ready for publication. Check out the boxed set that brings together Volumes 1 - 4A in one elegant case, and ......一起来看看 《The Art of Computer Programming, Volume 4, Fascicle 3》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具