Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fileowner(3) [php man page]

FILEOWNER(3)								 1							      FILEOWNER(3)

fileowner - Gets file owner

SYNOPSIS
int fileowner (string $filename) DESCRIPTION
Gets the file owner. PARAMETERS
o $filename - Path to the file. RETURN VALUES
Returns the user ID of the owner of the file, or FALSE on failure. The user ID is returned in numerical format, use posix_getpwuid(3) to resolve it to a username. EXAMPLES
Example #1 Finding the owner of a file <?php $filename = 'index.php'; print_r(posix_getpwuid(fileowner($filename))); ?> ERRORS
/EXCEPTIONS Upon failure, an E_WARNING is emitted. NOTES
Note The results of this function are cached. See clearstatcache(3) for more details. Tip As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine which wrappers support stat(3) family of functionality. SEE ALSO
filegroup(3), stat(3), posix_getpwuid(3). PHP Documentation Group FILEOWNER(3)

Check Out this Related Man Page

FILEMTIME(3)								 1							      FILEMTIME(3)

filemtime - Gets file modification time

SYNOPSIS
int filemtime (string $filename) DESCRIPTION
This function returns the time when the data blocks of a file were being written to, that is, the time when the content of the file was changed. PARAMETERS
o $filename - Path to the file. RETURN VALUES
Returns the time the file was last modified, or FALSE on failure. The time is returned as a Unix timestamp, which is suitable for the date(3) function. EXAMPLES
Example #1 filemtime(3) example <?php // outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23. $filename = 'somefile.txt'; if (file_exists($filename)) { echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename)); } ?> ERRORS
/EXCEPTIONS Upon failure, an E_WARNING is emitted. NOTES
Note Note that time resolution may differ from one file system to another. Note The results of this function are cached. See clearstatcache(3) for more details. Tip As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine which wrappers support stat(3) family of functionality. SEE ALSO
filectime(3), stat(3), touch(3), getlastmod(3). PHP Documentation Group FILEMTIME(3)
Man Page

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

permissions

Can someone pleas tell me if there is something funny when it comes to unix permissions and PHP. When php creates a file in unix the owner is nobody...does this raise any issues, and if it does could someone please tell me a web site where I could read more about this. Thanks alot. John (2 Replies)
Discussion started by: jmg5
2 Replies

2. Cybersecurity

TCP Wrappers

I have installed TCP wrappers , Good package ... I have a problem with the hosts_options part ... I am not able to use the twist command .. It just dosent respond I have compiled wrappers 7.6 for Solaris 8 with ipv6 support ... Everything works fine except the twist doesnt work I have... (1 Reply)
Discussion started by: DPAI
1 Replies

3. Shell Programming and Scripting

searching the name and sending mail

hi , i want to know how to do this.... i have a file in which an owner name and corresponding filename are written as shown below... owner filename abc /home/accounts/results/new.txt abc /home/accounts/results/new1.txt abc ... (1 Reply)
Discussion started by: vyasa
1 Replies

4. UNIX for Dummies Questions & Answers

Finding the Group Owner Name

Hi all, How can i find the group owner name...??? Thanks (4 Replies)
Discussion started by: mansahr143
4 Replies