SplFileInfo::getOwner

(PHP 5 >= 5.1.2)

SplFileInfo::getOwnerGets the owner of the file

說明

public int SplFileInfo::getOwner ( void )

Gets the file owner. The owner ID is returned in numerical format.

參數

此函式沒有參數。

回傳值

The owner id in numerical format.

錯誤/例外

Throws RuntimeException on error.

範例

Example #1 SplFileInfo::getOwner() example

<?php
$info 
= new SplFileInfo('file.txt');
print_r(posix_getpwuid($info->getOwner()));
?>

參見

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top