(PHP 4, PHP 5, PHP 7)
Gets file owner
int fileowner ( string $filename )
Gets the file owner.
Parameters:
filename
Path to the file.
Returns:
Returns the user ID of the owner of the file, or FALSE
on failure. The user ID is returned in numerical format, use posix_getpwuid() to resolve it to a username.
Exception:
Upon failure, an E_WARNING
is emitted.
Notes:
The results of this function are cached. See clearstatcache() for more details.
Examples:
Finding the owner of a file
<?php $filename = 'index.php'; print_r(posix_getpwuid(fileowner($filename))); ?>
See also:
stat() -
Please login to continue.