chown
( PHP 4中, PHP 5中)
chown-更改文件所有者
描述
布尔chown(字符串$文件名,混合$用户)
企图改变档案的拥有者档案到用户的用户。只有Supervisor可以改变人的档案。
参数
文件名
文件路径。
用户
用户名或号码。
返回值
返回TRUE或FALSE的成功失败。
实例
<?php
// File name and username to use
$file_name= "foo.php";
$path = "/home/sites/php.net/public_html/sandbox" . $file_name ;
$user_name = "root";
// Set the user
chown($path, $user_name);
// Check the result
$stat = stat($path);
print_r(posix_getpwuid($stat['uid']));
?>
The above example will output something similar to:
array(7) {
["name"]=>
string(13) "php.net"
["passwd"]=>
string(1) "x"
["uid"]=>
int(148864)
["gid"]=>
int(148910)
["gecos"]=>
string(13) "php.net"
["dir"]=>
string(25) "/home/sites/php.net"
["shell"]=>
string(13) "/sbin/nologin"
}
站长推荐:
韩剧再婚皇后阿里云盘全集高清1080P资源链接-韩剧再婚皇后免费阿里云盘资源下载4K高清无删减版链接
poipiku网站如何打开-poipiku官网网页版访问入口
明日方舟:终末地-云游戏畅玩入口-明日方舟:终末地-网页版在线直连地址
poki在线小游戏网页版-poki免费游戏大全入口
poki游戏入口-点开即玩-poki游戏-在线免费畅玩
原神akt大佬资源viciNeko入口链接-原神akt大佬资源网页vicineko入口链接分享