PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

chmod> <basename
Last updated: Fri, 25 Jul 2008

view this page in

chgrp

(PHP 4, PHP 5)

chgrpファイルのグループを変更する

説明

bool chgrp ( string $filename , mixed $group )

(名前または番号で指定した)ファイル filename のグループを group に変更しようと試みます。

スーパーユーザのみがファイルのグループを任意に変更できます。 その他のユーザは、ファイルのグループをそのユーザがメンバーとして 属しているグループに変更できます。

パラメータ

filename

ファイルへのパス。

group

グループ名あるいはグループ番号。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

注意

注意: この関数では、 リモートファイル を 使用することはできません。これは、処理されるファイルがサーバの ファイルシステムによりアクセスできる必要があるためです。

注意: セーフモード が有効の場合、PHP は操作を行うファイル/ディレクトリが実行するスクリプトと 同じ UID (所有者)を有しているかどうかを確認します。

参考



add a note add a note User Contributed Notes
chgrp
Dan Dascalescu
03-Dec-2007 05:12
If you call chgrp and pass a non-existent group, you'll get the warning "Warning: chgrp(): Unable to find gid for nogroup in".

To check beforehand if the group exists, use posix_getgrid() or posix_getgrnam().

chmod> <basename
Last updated: Fri, 25 Jul 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites