PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

fileperms> <filemtime
Last updated: Mon, 26 Nov 2007

view this page in

fileowner

(PHP 4, PHP 5)

fileowner — 取得文件的所有者

说明

int fileowner ( string $filename )

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

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

Tip

PHP 5.0.0 起本函数也可被某些 URL wrapper 使用。参考支持的协议/封装协议列表 来看哪些 wrapper 支持 stat() 系列函数的功能。

参见 stat()



add a note add a note User Contributed Notes
fileowner
joacorck at gmail dot com
26-Feb-2007 09:20
This function only works if the permissions are more less than 666
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 :(

fileperms> <filemtime
Last updated: Mon, 26 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites