Give me back the owner’s user ID for “test.txt”:
<?php echo fileowner(“test.txt”); ?> |
The user ID (owner) of the given file is returned by the fileowner() function.
Advice: To translate the user ID to a user name, use posix_getpwuid().
Note: This function caches its output. To clear the cache, use clearstatcache().
fileowner(filename) |
Parameter |
Description |
filename |
Essential. gives the location of the file to be checked. |
Return Value: |
When the file is successful, the owner’s user ID appears; when it doesn’t, FALSE |
PHP Version: |
4.0+ |