0

Syntax

int filegroup ( string $filename );

Definition and Usage

Gets the file group. The group ID is returned in numerical format, use posix_getgrgid() to resolve it to a group name.

Paramters

ParameterDescription
filenamePath to the file.

Return Value

Returns the group ID of the file, or FALSE in case of an error. The group ID is returned in numerical format, use posix_getgrgid() to resolve it to a group name. Upon failure, FALSE is returned.
Upon failure, an E_WARNING is emitted.

Example

Following is the usage of this function:

<?php
$filename = "/home/httpd/html/index.php";
$group = filegroup($filename);
echo "File group is $group\n";
?>

This will produce following result:

File group is guest

Post a Comment

 
Top