Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

PHP Function filegroup()


previous

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

previous Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names