PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

getenv> <get_magic_quotes_runtime
Last updated: Sat, 24 Mar 2007

view this page in

get_required_files

(PHP 4, PHP 5)

get_required_files — Vrátit pole jmen všech souborů, které byly v určitém skriptu načteny pomocí require_once()

Popis

array get_required_files ( void )

Tato funkce vrátí asociativní pole jmen všech souborů, které byly načteny do probíhajícího skriptu pomocí require_once(). Indexy tohoto pole jsou názvy souborů použitých v require_once() bez přípony ".php".

Následující příklad

Příklad 1560. Tisk require()ovaných a include()ovaných souborů

<?php

require_once ("local.php");
require_once ("../inc/global.php");

for ($i=1; $i<5; $i++)
  include "util".$i."php";

  echo "Required_once files\n";
  print_r (get_required_files());

  echo "Included_once files\n";
  print_r (get_included_files());
?>
      

vygeneruje následující výstup:
Required_once files
Array
(
  [local] => local.php
  [../inc/global] => /full/path/to/inc/global.php
)

Included_once files
Array
(
    [util1] => util1.php
    [util2] => util2.php
    [util3] => util3.php
    [util4] => util4.php
)
      

Poznámka: Od verze PHP 4.0.1pl2 tato funkce předpokládá, že soubory v required_once končí příponou ".php", jiné přípony nefungují.

Viz také: require_once(), include_once(), get_included_files()



add a note add a note User Contributed Notes
get_required_files
There are no user contributed notes for this page.

getenv> <get_magic_quotes_runtime
Last updated: Sat, 24 Mar 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites