array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.lchgrp.php', 1 => 'lchgrp', ), 'up' => array ( 0 => 'ref.filesystem.php', 1 => '文件系统函数', ), 'prev' => array ( 0 => 'function.is-writeable.php', 1 => 'is_writeable', ), 'next' => array ( 0 => 'function.lchown.php', 1 => 'lchown', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/filesystem/functions/lchgrp.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.1.3, PHP 7, PHP 8)
lchgrp — 修改符号链接的所有组
尝试修改符号链接 filename
的所有组 group
只有超级用户可以任意修改符号链接的所有组;其他用户可能需要有修改目标组的权限才能修改至目标所有组。
filename
符号链接路径
group
所有组的名字或者编号
示例 #1 更改符号链接的所有组
<?php
$target = 'output.php';
$link = 'output.html';
symlink($target, $link);
lchgrp($link, 8);
?>