<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.splfileinfo.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'splfileinfo.getrealpath.php',
    1 => 'SplFileInfo::getRealPath',
    2 => 'Gets absolute path to file',
  ),
  'up' => 
  array (
    0 => 'class.splfileinfo.php',
    1 => 'SplFileInfo',
  ),
  'prev' => 
  array (
    0 => 'splfileinfo.getperms.php',
    1 => 'SplFileInfo::getPerms',
  ),
  'next' => 
  array (
    0 => 'splfileinfo.getsize.php',
    1 => 'SplFileInfo::getSize',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/splfileinfo/getrealpath.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="splfileinfo.getrealpath" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SplFileInfo::getRealPath</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.2, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">SplFileInfo::getRealPath</span> &mdash; <span class="dc-title">Gets absolute path to file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-splfileinfo.getrealpath-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SplFileInfo::getRealPath</strong></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   This method expands all symbolic links, resolves relative references and returns the real path to the file.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-splfileinfo.getrealpath-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">Questa funzione non contiene parametri.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-splfileinfo.getrealpath-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns the path to the file, or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if the file does not exist.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-splfileinfo.getrealpath-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>SplFileInfo::getRealPath()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/..//./../../'</span><span style="color: #007700">.</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRealPath</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/tmp'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRealPath</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/I/Do/Not/Exist'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRealPath</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://output'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRealPath</span><span style="color: #007700">());<br /><br /></span><span style="color: #0000BB">$info </span><span style="color: #007700">= new </span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$info</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getRealPath</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(28) &quot;/private/tmp/phptempfile.php&quot; 
string(12) &quot;/private/tmp&quot;
bool(false)
bool(false)
string(12) &quot;/private/tmp&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-splfileinfo.getrealpath-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="splfileinfo.islink.php" class="methodname" rel="rdfs-seeAlso">SplFileInfo::isLink()</a> - Tells if the file is a link</span></li>
    <li><span class="methodname"><a href="function.realpath.php" class="methodname" rel="rdfs-seeAlso">realpath()</a> - Restituisce un percorso assoluto regolare</span></li>
   </ul>
  </p>
 </div>


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