LOADING STUFF...

PHP:fileperms()的用法_Filesystem函数

技术教程3小时前更新 北陌
15 0 0

PHP:fileperms()的用法_Filesystem函数

fileperms

(PHP 4, PHP 5)

fileperms — 取得文件的权限

说明

int fileperms
( string $filename
)

取得文件的权限。

参数

filename

文件的路径。

返回值

以数字模式返回文件的访问权限。
Returns the files permissions as a numeric mode.
Lower bits of this mode
are the same as the permissions expected by chmod(),
however on most platforms the return value will also include information on
the type of file given as filename. The examples
below demonstrate how to test the return value for specific permissions and
file types on POSIX systems, including Linux and Mac OS X.

For local files, the specific return value is that of the
st_mode member of the structure returned by the C
librarys stat() function. Exactly which bits are set
can vary from platform to platform, and looking up your specific platforms
documentation is recommended if parsing the non-permission bits of the
return value is required.

范例

Example #1 以八进制的形式显示文件的权限

echo

© 版权声明

相关文章

暂无评论

暂无评论...