Home> php教程> php手册> body text

php umask 函数教程

WBOY
Release: 2016-06-13 11:17:28
Original
1473 people have browsed it

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');
}
?>


source:php.cn
Statement of this Website
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
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!