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

search for in the

Exception::getLine> <Exception::getCode
[edit] Last updated: Sun, 26 May 2013

view this page in

Exception::getFile

(PHP 5 >= 5.1.0)

Exception::getFile获取发生异常的程序文件名称

说明

final public string Exception::getFile ( void )

获取发生异常的程序文件名称。

参数

此函数没有参数。

返回值

返回发生异常的程序文件名称。

范例

Example #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 - [0 notes]
There are no user contributed notes for this page.

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