Curriculum
Course: PHP Basic
Login

Curriculum

PHP Basic

PHP Install

0/1

PHP Casting

0/1

PHP Constants

0/1

PHP Magic Constants

0/1

PHP Operators

0/1

PHP Reference

0/276
Text lesson

chgrp()

Example

Set the user group to “admin” for the file “test.txt”.

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

Definition and Usage

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

Syntax

chgrp(filegroup)

Parameter Values

Parameter

Description

file

Mandatory. Indicates the path to the file for which the user group is to be changed.

group

Mandatory. Specifies the new group name or ID.

Technical Details

Return Value:

Returns TRUE on success and FALSE on failure.

PHP Version:

4.0+