Join Up!
96812 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousget_magic_quotes_runtimegetenvnext
Last updated: Sun, 27 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Finnish | German | Spanish

get_required_files

(PHP 4 )

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 1. 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()

User Contributed Notes
get_required_files
add a note about notes
There are no user contributed notes for this page.
previousget_magic_quotes_runtimegetenvnext
Last updated: Sun, 27 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST