Gets file group
Syntax
filegroup ( string $filename ) : int
Parameters
filename
Path to the file.
Return
Returns the group ID of the file, or FALSE if an error occurs. The group ID is returned in numerical format, use posix_getgrgid() to resolve it to a group name. Upon failure, FALSE is returned.
Examples
1
<? $filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/file.txt'; $return = filegroup($filename); print_r($return); ?>
1234567
2
<? $filename = $_SERVER['DOCUMENT_ROOT'] . '/assets/txt/file.txt'; $return = filegroup($filename); $posix_getgrgid = posix_getgrgid($return); print_r($posix_getgrgid); ?>
Array ( [name] => root [passwd] => x [members] => Array ( ) [gid] => 1234567 )