Error::getFile
(PHP 7, PHP 8)
Error::getFile — 获取错误发生时的文件
说明
final public Error::getFile(): string
获取错误发生时的文件名称。
参数
此函数没有参数。
返回值
返回错误发生时的文件名。
范例
示例 #1 Error::getFile() 例子
<?php
try {
throw new Error;
} catch(Error $e) {
echo $e->getFile();
}
?>
以上例程的输出类似于:
/home/bjori/tmp/ex.php

User Contributed Notes
There are no user contributed notes for this page.