array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'exception.getfile.php', 1 => 'Exception::getFile', ), 'up' => array ( 0 => 'class.exception.php', 1 => 'Exception', ), 'prev' => array ( 0 => 'exception.getcode.php', 1 => 'Exception::getCode', ), 'next' => array ( 0 => 'exception.getline.php', 1 => 'Exception::getLine', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'language/predefined/exception/getfile.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
Exception::getFile — İstisnanın oluştuğu dosyanın adı ile döner
Bu işlevin bağımsız değişkeni yoktur.
İstisnanın oluştuğu dosyanın adı ile döner.
Örnek 1 - Exception::getFile() örneği
<?php
try {
throw new Exception;
} catch(Exception $e) {
echo $e->getFile();
}
?>
Yukarıdaki örnek şuna benzer bir çıktı üretir:
/home/bjori/tmp/ex.php