PHP fileperms() 函数
PHP 教程
· 2019-01-24 23:44:14
定义和用法
fileperms() 函数返回文件或目录的权限。
如果成功,该函数以数字形式返回权限。如果失败,则返回 FALSE。
语法
fileperms(filename)
| 参数 | 描述 |
|---|---|
| filename | 必需。规定要检查的文件。 |
提示和注释
注释:该函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。
实例 1
<?php
echo fileperms("test.txt");
?>
上面的代码将输出:
33206
实例 2
以八进制值显示权限:
<?php
echo substr(sprintf("%o",fileperms("test.txt")),-4);
?>
上面的代码将输出:
1777
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Web Design for ROI
Lance Loveday、Sandra Niehaus / New Riders Press / 2007-10-27 / USD 39.99
Your web site is a business--design it like one. Billions of dollars in spending decisions are influenced by web sites. So why aren't businesses laser-focused on designing their sites to maximize thei......一起来看看 《Web Design for ROI》 这本书的介绍吧!