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

filegroup()

Example

Get the group ID of “test.txt”:

<?php
echo filegroup(“test.txt”);
?>

Definition and Usage

The filegroup() function returns the group ID of a file.

Tip: Use the posix_getgrgid() function to convert the group ID to a group name.

 

Note: The result is cached. Use clearstatcache() to clear the cache.

Syntax

filegroup(filename)

Parameter Values

 

Parameter

Description

filename

Mandatory. Specifies the path to the file to check.

Technical Details

Return Value:

Returns the group ID of the file on success, or FALSE on failure.

PHP Version:

4.0+