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

search for in the

posix_getegid> <posix_get_last_error
Last updated: Fri, 03 Oct 2008

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() で取得することができます。

例1 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 03: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.

posix_getegid> <posix_get_last_error
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites