Home > php教程 > php手册 > PHP 获取文件权限函数介绍

PHP 获取文件权限函数介绍

WBOY
Release: 2016-06-06 20:28:26
Original
1817 people have browsed it

以下是对PHP中的获取文件权限函数进行了介绍,需要的朋友可以参考下

复制代码 代码如下:


/*
 * substr 返回字符串的子串
 * base_convert  在任意进制之间转换数字
 * fileperms  取得文件的权限
 */
// 获取权限
function getChmod($filepath){
    return substr(base_convert(@fileperms($filepath),10,8),-4);
}

,虚拟主机,香港虚拟主机,香港空间
Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template