PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<posix_getgidposix_getgrnam>
Last updated: Mon, 16 Jul 2012

posix_getgrgid

(PHP 3 >= 3.0.13, PHP 4, PHP 5)

posix_getgrgid -- Return info about a group by group id

Description

array posix_getgrgid ( int gid )

Returns an array of information about a group and FALSE on failure. If gid isn't a number then NULL is returned and an E_WARNING level error is generated.

例子 1. Example use of posix_getgrgid()

<?php

$groupid 
= posix_getegid();
$groupinfo = posix_getgrgid($groupid);

print_r($groupinfo);

?>

An example output:

Array
(
    [name]    => toons
    [passwd]  => x
    [members] => Array 
        ( 
            [0] => tom
            [1] => jerry
        )
    [gid]     => 42
)

注: As of PHP 4.2.0, members is returned as an array of member usernames in the group. Before this time it was simply an integer (the number of members in the group) and the member names were returned with numerical indices.

See also posix_getegid(), filegroup(), stat(), and safe_mode_gid.




<posix_getgidposix_getgrnam>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST