Home  >  Article  >  php教程  >  php umask 函数教程

php umask 函数教程

WBOY
WBOYOriginal
2016-06-13 11:17:281553browse

php umask 函数教程  

umask值
( PHP 4中, PHP 5中)

的umask -改变了当前的umask

描述
诠释的umask ( [国际$遮罩] )
的umask ( )设置PHP的umask值,以掩盖和0777并返回旧的umask 。当PHP被用作服务器模块, umask被恢复时,每个请求完成。

参数

遮罩
新的umask 。


返回值
umask值( )不带参数只返回当前的umask否则旧的umask被退还。

实例

例如# 1的umask ( )的例子

$old = umask(0);
chmod("/path/some_dir/some_file.txt", 0755);
umask($old);

// Checking
if ($old != umask()) {
    die('An error occured while changing back the umask');
}
?>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php http_build_query 实现教程Next article:php file 函数