If getcwd() returns nothing for you under Solaris with an NFS mounted subdirectory, you are running into an OS bug that is supposedly fixed in recent versions of Solaris 10. This same OS bug effects the include() and require() functions as well.
![]() |
|
||||||||||
|
getcwdОписаниеstring getcwd ( void )Возвращает имя текущего рабочего каталога. См.также описание функции chdir(). getcwd
ab5602 at wayne dot edu
30-Sep-2007 10:33
If getcwd() returns nothing for you under Solaris with an NFS mounted subdirectory, you are running into an OS bug that is supposedly fixed in recent versions of Solaris 10. This same OS bug effects the include() and require() functions as well.
troy dot cregger at gmail dot com
26-Jan-2007 12:10
Take care if you use getcwd() in file that you'll need to include (using include, require, or *_once) in a script located outside of the same directory tree.
mark dot phpnetspam at mhudson dot net
03-Nov-2006 01:42
This function is often used in conjuction with basename(), i.e.
hodgman at ali dot com dot au
06-Sep-2006 07:58
I use this code to replicate the pushd and popd DOS commands in PHP:
emailfire at gmail dot com
08-Dec-2005 06:57
To get the username of the account:
memandeemail at gmail dot com
07-Dec-2005 03:48
Some server's has security options to block the getcwd()
marcus at synchromedia dot co dot uk
04-May-2005 08:41
"On some Unix variants, getcwd() will return FALSE if any one of the parent directories does not have the readable or search mode set, even if the current directory does."
vermicin at antispam dot gmail dot com
27-Jan-2005 03:48
If your PHP cli binary is built as a cgi binary (check with php_sapi_name), the cwd functions differently than you might expect.
manux at manux dot org
21-Jun-2004 09:44
watch out:
dave at corecomm dot us
10-Dec-2003 10:14
getcwd() returns the path of the "main" script referenced in the URL.
fvu at wanadoo dot nl
23-Nov-2003 05:50
Make sure to lowercase the result before comparing Windows paths, because this function returns ambiguous results on Windows. From within Apache, the returned path is lowercase, while from the command line interface (CLI) the returned path uses the 'real' Windows pathname. For example, running the 'print getcwd();' command from 'C:\Program Files' returns either
raja at rajashahed dot com
06-Nov-2003 10:21
This is current working directory. X example, your document root is c:\Inetpub\www\htdocs. When You need to know what is your doc_root; /* Like ask yourself your name ;)*/ |