<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.get-included-files.php',
    1 => 'get_included_files',
    2 => 'Restituisce un array con i nomi dei file inclusi o richiesti',
  ),
  'up' => 
  array (
    0 => 'ref.info.php',
    1 => 'PHP Options/Info Funzioni',
  ),
  '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' => 'it',
    '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">
     Restituisce un array con i nomi dei file inclusi o richiesti
    </span></p>

   </div>
   <div class="refsect1 unknown-64" id="refsect1-function.get-included-files-unknown-64">
    <h3 class="title">Descrizione</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">
     Restituisce un array contenente i nomi di tutti i file che sono
     stati inclusi tramite le funzioni <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>
     oppure <span class="function"><a href="function.require-once.php" class="function">require_once</a></span>.
    </p>
    <p class="para">
     Lo script originario viene considerato come &#039;file incluso&#039;, pertanto
     sarà elencato insieme agli altri file referenziati da
     <span class="function"><a href="function.include.php" class="function">include</a></span> e simili.
    </p>
    <p class="para">
     File che sono inclusi più volte saranno elencati
     soltanto una volta sola
    </p>
    <blockquote class="note"><p><strong class="note">Nota</strong>: 
     <p class="para">
      File inclusi tramite la direttiva <code class="literal">auto_prepend_file</code>
      non saranno inseriti nell&#039;array.
     </p>
    </p></blockquote>
    <p class="para">
     <div class="example" id="example-1">
      <p><strong>Example #1 Esempio di uso di <span class="function"><strong>get_included_files()</strong></span> del file (<var class="filename">abc.php</var>)</strong></p>
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?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>
       l&#039;esempio visualizzerà:
      </p></div>
      <div class="example-contents screen">
<div class="cdata"><pre>
abc.php
test1.php
test2.php
test3.php
test4.php
</pre></div>
      </div>
     </div>
    </p>
    <blockquote class="note"><p><strong class="note">Nota</strong>: 
     <p class="para">
      In PHP 4.0.1pl2 e nelle versioni precedenti
      <span class="function"><strong>get_included_files()</strong></span> assumeva che 
      i file inclusi avessero come estensione <code class="literal">.php</code>;
      file con altre estensioni erano ignorati. L&#039;array restituito da 
      <span class="function"><strong>get_included_files()</strong></span> era un array associativo
      e riportava soltanto i file inclusi con <span class="function"><a href="function.include.php" class="function">include</a></span>
      e <span class="function"><a href="function.include-once.php" class="function">include_once</a></span>.
     </p>
    </p></blockquote>
    <p class="para">
     Vedere anche
     <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>,
     <span class="function"><a href="function.require-once.php" class="function">require_once</a></span> e
     <span class="function"><a href="function.get-required-files.php" class="function">get_required_files()</a></span>.
    </p>
   </div>

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