<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.info.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.get-included-files.php',
    1 => 'get_included_files',
    2 => 'Devuelve un array con los nombres de los ficheros que son incluidos en un script',
  ),
  'up' => 
  array (
    0 => 'ref.info.php',
    1 => 'Funciones de Opciones/Info de PHP',
  ),
  'prev' => 
  array (
    0 => 'function.get-include-path.php',
    1 => 'get_include_path',
  ),
  'next' => 
  array (
    0 => 'function.get-loaded-extensions.php',
    1 => 'get_loaded_extensions',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/info/functions/get-included-files.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.get-included-files" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">get_included_files</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">get_included_files</span> &mdash; <span class="dc-title">Devuelve un array con los nombres de los ficheros que son incluidos en un script</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.get-included-files-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>get_included_files</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Devuelve un array que contiene los nombres de todos los ficheros que han sido
   añadidos al script con las funciones
   <span class="function"><a href="function.include.php" class="function">include</a></span>,
   <span class="function"><a href="function.include-once.php" class="function">include_once</a></span>,
   <span class="function"><a href="function.require.php" class="function">require</a></span> o
   <span class="function"><a href="function.require-once.php" class="function">require_once</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.get-included-files-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">Esta función no contiene ningún parámetro.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.get-included-files-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Devuelve un array que contiene los nombres de todos los ficheros.
  </p>
  <p class="para">
   El script en curso es considerado como fichero incluido, por lo que será
   listado junto con los otros ficheros a los que se hace referencia con
   <span class="function"><a href="function.include.php" class="function">include</a></span> y las
   funciones similares.
  </p>
  <p class="para">
   Los ficheros incluidos o requeridos varias veces solo se muestran una vez en
   el array devuelto.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.get-included-files-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="function"><strong>get_included_files()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Este fichero es abc.php<br /><br /></span><span style="color: #007700">include </span><span style="color: #DD0000">'test1.php'</span><span style="color: #007700">;<br />include_once </span><span style="color: #DD0000">'test2.php'</span><span style="color: #007700">;<br />require </span><span style="color: #DD0000">'test3.php'</span><span style="color: #007700">;<br />require_once </span><span style="color: #DD0000">'test4.php'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$included_files </span><span style="color: #007700">= </span><span style="color: #0000BB">get_included_files</span><span style="color: #007700">();<br /><br />foreach (</span><span style="color: #0000BB">$included_files </span><span style="color: #007700">as </span><span style="color: #0000BB">$filename</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">"</span><span style="color: #0000BB">$filename</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>El ejemplo anterior mostrará:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">/path/to/abc.php
/path/to/test1.php
/path/to/test2.php
/path/to/test3.php
/path/to/test4.php</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.get-included-files-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.include.php" class="function" rel="rdfs-seeAlso">include</a> - include</span></li>
    <li><span class="function"><a href="function.include-once.php" class="function" rel="rdfs-seeAlso">include_once</a> - include_once</span></li>
    <li><span class="function"><a href="function.require.php" class="function" rel="rdfs-seeAlso">require</a> - require</span></li>
    <li><span class="function"><a href="function.require-once.php" class="function" rel="rdfs-seeAlso">require_once</a> - require_once</span></li>
    <li><span class="function"><a href="function.get-required-files.php" class="function" rel="rdfs-seeAlso">get_required_files()</a> - Alias de
  get_included_files</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>