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

search for in the

DirectoryIterator::getPath> <DirectoryIterator::getMTime
[edit] Last updated: Fri, 25 May 2012

view this page in

DirectoryIterator::getOwner

(PHP 5)

DirectoryIterator::getOwner現在の DirectoryIterator アイテムの所有者を取得する

説明

public int DirectoryIterator::getOwner ( void )

現在の DirectoryIterator アイテムの所有者を、数値形式で取得します。

パラメータ

この関数にはパラメータはありません。

返り値

ファイルの所有者を、数値形式で返します。

例1 DirectoryIterator::getOwner() の例

この例は、スクリプトのあるディレクトリの所有者を表示します。

<?php
$iterator 
= new DirectoryIterator(dirname(__FILE__));
print_r(posix_getpwuid($iterator->getOwner()));
?>

上の例の出力は、 たとえば以下のようになります。

Array
(
    [name] => tom
    [passwd] => x
    [uid] => 501
    [gid] => 42
    [gecos] => Tom Cat
    [dir] => /home/tom
    [shell] => /bin/bash
)

参考



add a note add a note User Contributed Notes DirectoryIterator::getOwner
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites