<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.filesystem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'function.pathinfo.php',
    1 => 'pathinfo',
    2 => 'Bir dosya yolu hakkında bilgi d&ouml;nd&uuml;r&uuml;r',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Dosya Sistemi İşlevleri',
  ),
  'prev' => 
  array (
    0 => 'function.parse-ini-string.php',
    1 => 'parse_ini_string',
  ),
  'next' => 
  array (
    0 => 'function.pclose.php',
    1 => 'pclose',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'tr',
    'path' => 'reference/filesystem/functions/pathinfo.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pathinfo" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pathinfo</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.3, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">pathinfo</span> &mdash; <span class="dc-title">Bir dosya yolu hakkında bilgi döndürür</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.pathinfo-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pathinfo</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$yol</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$seçenekler</code><span class="initializer"> = <strong><code><a href="filesystem.constants.php#constant.pathinfo-all">PATHINFO_ALL</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>pathinfo()</strong></span> işlevi belirtilen
   <code class="parameter">seçenekler</code>e bağlı olarak, belirtilen
   <code class="parameter">yol</code> hakkında bilgi içeren bir ilişkisel dizi
   ya da bir dizge döndürür.
  </p>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    Geçerli dosya yolu bilgisinin alınması hakkında daha ayrıntılı bilgi
    edinmek için <a href="language.variables.predefined.php" class="link">
    Öntanımlı Değişkenler</a> bölümü okunabilir.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    <span class="function"><strong>pathinfo()</strong></span> safça girdi dizgesi üzerinde çalışır, dosya
    sisteminden ve &quot;<code class="literal">..</code>&quot; gibi bileşenlerden haberi yoktur.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    Yalnızca Windows sistemlerinde, <code class="literal">\</code> karakteri bir dizin
    ayırıcı olarak yorumlanır. Diğer sistemlerde ise herhangi bir karakter
    gibi ele alınır.
   </p>
  </p></blockquote>
  <div class="caution"><strong class="caution">Dikkat</strong>
   <p class="para">
    <span class="function"><strong>pathinfo()</strong></span> yereli de bilmez, bundan dolayı çok baytlı
    karakterler içeren dosya yollarından doğru bileşeni ayırabilmesi için
    eşleşen yerelin <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> işlevi kullanılarak
    atanması gerekir.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pathinfo-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">yol</code></dt>
     <dd>
      <p class="para">
       Bilgi toplanacak yol.
      </p>
     </dd>
    
    
     <dt><code class="parameter">seçenekler</code></dt>
     <dd>
      <p class="para">
       İsteğe bağlı <code class="parameter">seçenekler</code> bağımsız değişkeninde hangi
       bileşenlerin döndürüleceğini
       <strong><code><a href="filesystem.constants.php#constant.pathinfo-dirname">PATHINFO_DIRNAME</a></code></strong>,
       <strong><code><a href="filesystem.constants.php#constant.pathinfo-basename">PATHINFO_BASENAME</a></code></strong>,
       <strong><code><a href="filesystem.constants.php#constant.pathinfo-extension">PATHINFO_EXTENSION</a></code></strong> ve
       <strong><code><a href="filesystem.constants.php#constant.pathinfo-filename">PATHINFO_FILENAME</a></code></strong> seçeneklerinin birleşimi olarak
       belirtebilirsiniz. Bir değer belirtilmezse tüm bileşenler döndürülür.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pathinfo-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="para">
   <code class="parameter">seçenekler</code> bağımsız değişkeni atlanırsa dönen ilişkisel
   dizi şu bileşenleri içerir: <code class="literal">dirname</code> (dizin ismi),
   <code class="literal">basename</code> (uzantısız isim), <code class="literal">extension</code>
   (uzantı) ve <code class="literal">filename</code> (dosya ismi).
  </p>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    <code class="parameter">yol</code> birden fazla uzantı içeriyorsa
    <strong><code><a href="filesystem.constants.php#constant.pathinfo-extension">PATHINFO_EXTENSION</a></code></strong> seçeneği ile yalnızca sonuncusu
    dönerken <strong><code><a href="filesystem.constants.php#constant.pathinfo-filename">PATHINFO_FILENAME</a></code></strong> seçeneğinde ise sadece
    sonuncu uzantı kırpılır. Aşağıdaki örneğe bakınız.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    <code class="parameter">yol</code> bir uzantı içermiyorsa dönen dizi
    <code class="literal">extension</code> elemanını içermez.
    Aşağıdaki örneğe bakınız.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Bilginize</strong>: 
   <p class="para">
    <code class="parameter">yol</code>&#039;un <code class="literal">basename</code> elemanı bir
    nokta ile başlıyorsa, noktadan sonrası <code class="literal">extension</code>
    elemanına aktarılır, <code class="literal">filename</code> elemanı ise boş kalır.
    Aşağıdaki örneğe bakınız.
   </p>
  </p></blockquote>
  <p class="para">
   Eğer <code class="parameter">seçenekler</code> belirtilirse ve tüm bileşenler
   istenmemişse işlev bir ilişkisel dizi değil, bir dizge döndürür.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.pathinfo-examples">
  <h3 class="title">Örnekler</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Örnek 1 - <span class="function"><strong>pathinfo()</strong></span> örneği</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$path_parts </span><span style="color: #007700">= </span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/www/htdocs/inc/lib.inc.php'</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #0000BB">$path_parts</span><span style="color: #007700">[</span><span style="color: #DD0000">'dirname'</span><span style="color: #007700">], </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">$path_parts</span><span style="color: #007700">[</span><span style="color: #DD0000">'basename'</span><span style="color: #007700">], </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">$path_parts</span><span style="color: #007700">[</span><span style="color: #DD0000">'extension'</span><span style="color: #007700">], </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">$path_parts</span><span style="color: #007700">[</span><span style="color: #DD0000">'filename'</span><span style="color: #007700">], </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>
Yukarıdaki örneğin çıktısı:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">/www/htdocs/inc
lib.inc.php
php
lib.inc</pre>
</div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Örnek 2 - Uzantısız ve boş uzantılı farkını gösteren
     <span class="function"><strong>pathinfo()</strong></span> örneği</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$path_parts </span><span style="color: #007700">= </span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/yol/bosuzanti.'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$path_parts</span><span style="color: #007700">[</span><span style="color: #DD0000">'extension'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">$path_parts </span><span style="color: #007700">= </span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/yol/yokuzanti'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$path_parts</span><span style="color: #007700">[</span><span style="color: #DD0000">'extension'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(0) &quot;&quot;

Notice: Undefined index: extension in test.php on line 6
NULL</pre>
</div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-3">
    <p><strong>Örnek 3 - <span class="function"><strong>pathinfo()</strong></span> ve  uzantı-dosya</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/some/path/.test'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [dirname] =&gt; /some/path
    [basename] =&gt; .test
    [extension] =&gt; test
    [filename] =&gt;
)</pre>
</div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-4">
    <p><strong>Örnek 4 - <span class="function"><strong>pathinfo()</strong></span> dizi başvurusunu kaldırma örneği</strong></p>
    <div class="example-contents"><p>
     <code class="parameter">seçenekler</code> bit maskesi değildir. Tek bir değer
     aktarılabilir. Yalnızca çözümlenmiş değerlerden oluşan sınırlı bir
     değer kümesini seçmek için dizi yıkımı şu şekilde kullanılabilir:
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">[</span><span style="color: #DD0000">'basename' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$basename</span><span style="color: #007700">, </span><span style="color: #DD0000">'dirname' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$dirname</span><span style="color: #007700">] = </span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'/www/htdocs/inc/lib.inc.php'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$basename</span><span style="color: #007700">, </span><span style="color: #0000BB">$dirname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>
Yukarıdaki örnek şuna benzer bir çıktı üretir:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(11) &quot;lib.inc.php&quot;
string(15) &quot;/www/htdocs/inc&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.pathinfo-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.dirname.php" class="function" rel="rdfs-seeAlso">dirname()</a> - &Uuml;st dizinin yolunu d&ouml;nd&uuml;r&uuml;r</span></li>
    <li><span class="function"><a href="function.basename.php" class="function" rel="rdfs-seeAlso">basename()</a> - Dosya yolunun ucundaki dosya ismi bileşenini d&ouml;nd&uuml;r&uuml;r</span></li>
    <li><span class="function"><a href="function.parse-url.php" class="function" rel="rdfs-seeAlso">parse_url()</a> - Bir URL'yi bileşenlerine ayırır</span></li>
    <li><span class="function"><a href="function.realpath.php" class="function" rel="rdfs-seeAlso">realpath()</a> - Normalleştirilmiş mutlak dosya yolunu d&ouml;nd&uuml;r&uuml;r</span></li>
   </ul>
  </p>
 </div>


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