PHP filegroup()Functions


PHP Filesystem 参考手册Complete PHP Filesystem Reference

Definition and Usage

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

If successful, this function returns the group ID of the file. If it fails, it returns FALSE.

Syntax

filegroup(filename)

Parameters Description
filename Required. Specifies the file to check.


Tips and Notes

Note:The results of this function are cached. Use clearstatcache() to clear the cache.

Note:This function does not work on Windows systems.

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


Example

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


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