2 /* Prototype: int filegroup ( string $filename )
3 * Description: Returns the group ID of the file, or FALSE in case of an error.
6 echo "*** Testing filegroup(): basic functionality ***\n";
8 echo "-- Testing with the file or directory created by owner --\n";
10 $file_path = dirname(__FILE__
);
11 var_dump( filegroup(__FILE__
) );
12 var_dump( filegroup(".") );
13 var_dump( filegroup("./..") );
15 /* Newly created files and dirs */
16 $file_name = $file_path."/filegroup_basic.tmp";
17 $file_handle = fopen($file_name, "w");
19 $string = "Hello, world\n1234\n123Hello";
20 fwrite($file_handle, $string);
21 var_dump( filegroup($file_name) );
24 $dir_name = $file_path."/filegroup_basic";
26 var_dump( filegroup($dir_name) );
28 echo "\n-- Testing with the standard file or directory --\n";
29 var_dump( filegroup("/etc/passwd") );
30 var_dump( filegroup("/etc") );
31 var_dump( filegroup("/") );
33 echo "\n*** Done ***\n";
37 $file_path = dirname(__FILE__
);
38 $file_name = $file_path."/filegroup_basic.tmp";
39 $dir_name = $file_path."/filegroup_basic";