Warning: include(../lntop.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 19

Warning: include() [function.include]: Failed opening '../lntop.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 19

Warning: include(../levoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 46

Warning: include() [function.include]: Failed opening '../levoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 46



Учебник РНР
Назад Вперёд

get_included_files

(PHP 4)

get_included_files - возвращает массив из имён файлов, включаемых (include) или необходимых.

Описание

array get_included_files (void)

Возвращает массив имён всех файлов, которые включены с использованием include(), include_once(), require() или require_once().

Файлы, включённые или затребованные несколько раз, показаны в возвращаемом массиве только один раз.

Примечание: файлы, включённые с использованием директивы конфигурации auto_prepend_file, не входят в возвращаемый массив.

Пример 1. get_included_files()
<?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";
}

?>

сгенерирует на выводе:

test1.php
test2.php
test3.php
test4.php

Примечание: в PHP 4.0.1pl2 и предыдущих версиях для get_included_files() принималось, что требуемые файлы имели расширении имени .php; другие расширения не возвращались. Массив, возвращаемый функцией get_included_files(), был ассоциативным и содержал только имена файлов, включённых с помощью include() и include_once().

См. также include(), include_once(), require(), require_once() и get_required_files().


Назад Оглавление Вперёд
get_extension_funcs Вверхget_loaded_extensions


Warning: include(../pravoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 166

Warning: include() [function.include]: Failed opening '../pravoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 166

Rambler's Top100
© 2009 Тест скорости интернета |  Boont.Ru

Warning: include(../lnbottom.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 292

Warning: include() [function.include]: Failed opening '../lnbottom.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/get-included-files.html on line 292