PHP chgrp()Function


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual

Definition and Usage

The chgrp() function changes the user group of the specified file.

Returns TRUE on success, or FALSE on failure.

Syntax

chgrp(file,group)

Parameters Description
file Required. Specifies the file to be checked.
group Optional. Specifies the new group. Can be a group name or a group ID.


Example

<?php
chgrp("test.txt","admin")
?>


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual Other Extensions