Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: posix_getcwd - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

posix_getegid" width="11" height="7"/> <posix_get_last_error
Last updated: Thu, 31 May 2007

view this page in

posix_getcwd

(PHP 4, PHP 5)

posix_getcwd — 現在のディレクトリのパス名

説明

string posix_getcwd ( void )

スクリプトの現在の実行ディレクトリのパスを、絶対パスで取得します。 エラー時には errno を設定します。この値は posix_get_last_error() で取得することができます。

返り値

絶対パスを表す文字列を返します。 エラー時には FALSE を返し、errno を設定します。この値は posix_get_last_error() で取得することができます。

例 1818. posix_getcwd() の例

この例は、このスクリプトの現在の作業ディレクトリの絶対パスを返します。

<?php
echo '現在の作業ディレクトリは '.posix_getcwd();
?>

注意

注意: 以下のような場合は、この関数は失敗します。

  • 読み込みあるいは検索の権限が取得できない
  • パスが存在しない



add a note add a note User Contributed Notes
posix_getcwd
phpmanual-getcwd at devin dot com
27-Jul-2000 10:39
From the GNU getcwd(3) manpage, paraphrased: returns the absolute pathname of the current working directory.  Fails when the current directory is not eradable.  Complies with POSIX.1 spec.

 
show source | credits | sitemap | contact | advertising | mirror sites