From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.6
PHP Bug Type:     Unknown/Other Function
Bug description:  getcwd() and `pwd` return wrong directory

I've written a small shell script in PHP, which should return the current
working directory:

-----
#!/usr/bin/php -q
<?php
echo `pwd`;
echo getcwd();
?>
-----

I've stored the script as /scripts/test.php and on the shell, I'm in
/scripts/Testing.  When I run the script with »../test.php«, it returns
»/scripts« two times.  I'd expect it to return »/scripts/Testing« two
times.

However, HTTP_ENV_VARS['PWD'] and HTTP_SERVER_VARS['PWD'] both contain the
correct (ie. /scripts/Testing) path.
-- 
Edit bug report at: http://bugs.php.net/?id=14214&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to