array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), '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' => 'ja', '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);
?>
注意: この関数では、 リモートファイル を 使用することはできません。これは、処理されるファイルがサーバーの ファイルシステムによりアクセスできる必要があるためです。
注意: この関数は Windows 環境にはまだ実装されていません。