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

search for in the

Exception::getLine> <Exception::getCode
Last updated: Fri, 13 Nov 2009

view this page in

Exception::getFile

(PHP 5 >= 5.1.0)

Exception::getFile例外が発生したファイルを取得する

説明

final public string Exception::getFile ( void )

例外がスローされたファイルの名前を取得します。

パラメータ

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

返り値

例外がスローされたファイルの名前を返します。

例1 Exception::getFile() の例

<?php
try {
    throw new 
Exception;
} catch(
Exception $e) {
    echo 
$e->getFile();
}
?>

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

/home/bjori/tmp/ex.php



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

Exception::getLine> <Exception::getCode
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites