PHP fileowner()Functions


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual

Definition and Usage

The fileowner() function returns the user ID (owner) of the specified file.

If successful, the function returns the user ID. If it fails, it returns FALSE.

Syntax

fileowner(filename)

Parameters Description
filename Required. Specifies the file to check.


Tips and Notes

Note:The results of this function are cached. Use clearstatcache() to clear the cache.

Note:This function does not work on Windows systems.

Tip:Use posix_getpwuid() to convert the user ID to a username.


Examples

<?php
echo fileowner("test.txt");
?>


PHP Filesystem 参考手册Complete PHP Filesystem Reference Manual Other Extensions