fileowner

int fileowner(string filename) 

Retrieves the file owner’s ID.

Returns:

User ID of the file owner; FALSE on error

Description:

Returns the user ID of the specified file. This function doesn’t produce meaningful results on systems not supporting UNIX-like filesystems.

Note:

The results of this function are cached. See clearstatcache() for details.

Example:

Print the file owner’s ID
$fileowner = fileowner("myfile"); 
echo ($fileowner); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.