<?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 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'function.get-included-files.php',
    1 => 'get_included_files',
    2 => 'Retorna um array com os nomes dos arquivos inclu&iacute;dos ou requeridos',
  ),
  'up' => 
  array (
    0 => 'ref.info.php',
    1 => 'Fun&ccedil;&otilde;es para Op&ccedil;&otilde;es/Info do 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' => 'pt_BR',
    '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">Retorna um array com os nomes dos arquivos incluídos ou requeridos</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.get-included-files-description">
  <h3 class="title">Descrição</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">
   Obtém os nomes de todos os arquivos que foram incluídos usando
   <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> ou <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 função não possui parâmetros.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.get-included-files-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="para">
   Retorna um array com os nomes de todos os arquivos.
  </p>
  <p class="para">
   O script chamado originalmente é considerado um &quot;arquivo incluído&quot;, portanto será
   listado junto com os arquivos referenciados por
   <span class="function"><a href="function.include.php" class="function">include</a></span> e cia.
  </p>
  <p class="para">
   Os arquivos incluídos ou requeridos várias vezes aparecem apenas uma vez no
   array retornado.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.get-included-files-examples">
  <h3 class="title">Exemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemplo #1 Exemplo de <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 arquivo é o 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>O exemplo acima produzirá:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">/caminho/para/abc.php
/caminho/para/test1.php
/caminho/para/test2.php
/caminho/para/test3.php
/caminho/para/test4.php</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.get-included-files-seealso">
  <h3 class="title">Veja Também</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> - Sin&ocirc;nimo de get_included_files</span></li>
   </ul>
  </p>
 </div>


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