PHP chmod() 函数

 

chmod() 函数改变文件模式。

如果成功则返回 TRUE,否则返回 FALSE。

例子

<?php
// 所有者可读写,其他人没有任何权限
chmod("test.txt",0600);

// 所有者可读写,其他人可读
chmod("test.txt",0644);

// 所有者有所有权限,其他所有人可读和执行
chmod("test.txt",0755);

// 所有者有所有权限,所有者所在的组可读
chmod("test.txt",0740);
?> 

 

参考:

https://www.w3school.com.cn/php/func_filesystem_chmod.asp

 

 

posted @ 2019-08-01 00:02  anobscureretreat  阅读(426)  评论(0编辑  收藏  举报