fileowner

(PHP 3, PHP 4, PHP 5)

fileowner -- 取得文件的所有者

说明

int fileowner ( string filename )

返回文件所有的用户 ID,如果出错则返回 FALSE。用户 ID 以数字格式返回,用 posix_getpwuid() 来将其解析为用户名。

注: 本函数的结果会被缓存。更多信息参见 clearstatcache()

提示: PHP 5.0.0 起本函数也可被某些 URL wrapper 使用。参考附录 L 来看哪些 wrapper 支持 stat() 系列函数的功能。

参见 stat()


add a note add a note User Contributed Notes
29-Jan-2006 08:58
Small note: the function resolves symbolic links. That is, if the link is created by user 999 and maps to a file owned by user 666, this function returns 666 :(
Alienka
26-Apr-2003 06:26
I have PHP Version 4.3.0 running under Windows 2000.
And this function is available :)
It returns a boolean false if the file given as a parameter does not exist. And returns integer 0 for a file that does exist.