PHP » I/O » fileowner()

Syntax:
int fileowner(string filename)
filename
The name of the file.

Returns the owner of a file.

The value returned is the user ID in numerical form, or FALSE if the call fails.

Examples

Code:
<?php

$user = posix_getpwuid(fileowner("fileowner.php"));
print "The owner of the file is: " . $user["name"];

?>
Output:
The owner of the file is: root
Explanation:

This code prints who the owner of a file is.

See Also: