跳转到主要内容

getfile

Exception::getFile

Gets the file in which the exception was created

ENTITY

final

public

string

Exception::getFile

Get the name of the file in which the exception was created.

ENTITY ENTITY

ENTITY

Returns the filename in which the exception was created.

ENTITY

Exception::getFile example

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

    

ENTITY

/home/bjori/tmp/ex.php

ENTITY

Throwable::getFile