Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: chgrp - Manual
[go: Go Back, main page]

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

search for in the

chmod" width="11" height="7"/> <basename
Last updated: Sun, 25 Nov 2007

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
04-Dec-2007 10: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" width="11" height="7"/> <basename
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites