Latest web development tutorials

PHP fileowner () function

PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual

Definition and Usage

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

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

grammar

fileowner(filename)

参数 描述
filename 必需。规定要检查的文件。


Tips and Notes

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

Note: This function does not run on Windows systems.

Tip: Use posix_getpwuid () to convert the user ID for the user name.


Examples

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


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual