get_included_files
(PHP 4, PHP 5, PHP 7, PHP 8)
get_included_files — Betiğe dahil edilen dosyaların isimlerini içeren bir dizi
döndürür
Açıklama
get_included_files():
array
Bağımsız Değişkenler
Bu işlevin bağımsız değişkeni yoktur.
Dönen Değerler
Betiğe dahil edilen dosyaların isimlerini içeren bir dizi döndürür.
Betiğin kendisi de içerilmiş bir dosya olarak ele alınır ve ismi dönen
diziye dahil edilir.
Betiğe birden fazla dahil edilen dosyaların isimleri dönen dizi içinde bir
kere zikredilir.
Örnekler
Örnek 1 - get_included_files() örneği
<?php
// Dosyanın kendi ismi: abc.php
include 'test1.php';
include_once 'test2.php';
require 'test3.php';
require_once 'test4.php';
$included_files = get_included_files();
foreach ($included_files as $filename) {
echo "$filename\n";
}
?>
Yukarıdaki örneğin çıktısı:
/path/to/abc.php
/path/to/test1.php
/path/to/test2.php
/path/to/test3.php
/path/to/test4.php