array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.posix-getcwd.php', 1 => 'posix_getcwd', ), 'up' => array ( 0 => 'ref.posix.php', 1 => 'POSIX İşlevleri', ), 'prev' => array ( 0 => 'function.posix-get-last-error.php', 1 => 'posix_get_last_error', ), 'next' => array ( 0 => 'function.posix-getegid.php', 1 => 'posix_getegid', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/posix/functions/posix-getcwd.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
posix_getcwd — Çalışılan dizinin tam yolunu döndürür
Betiğin çalışma dizininin mutlak yolunu döndürür. Hata durumunda atanan hata numarasına posix_get_last_error() işlevi ile erişilebilir.
Bu işlevin bağımsız değişkeni yoktur.
İşlem sırasında bir hata oluşursa posix_get_last_error()
işlevi ile öğrenilmek üzere bir hata numarası atanır ve false
döner,
yoksa mutlak dizin yolunu içeren bir dizge döner.
Örnek 1 - posix_getcwd() örneği
Bu örnek, betiğin çalıştığı dizinin tam yolunu göstermektedir.
<?php
echo 'Çalışma dizinim: '.posix_getcwd();
?>
Bilginize:
bu işlev başarısız olur.
- Okuma ve arama izni yoksa
- veya mutlak yol artık mevcut değilse