~/worsh/worsh.php contains
print getcwd();
Now I do:
cd some-wordpress-site
php ~/worsh/worsh.php
And I get ~/worsh
- whereas I obviously want to just get some-wordpress-site
.
exec('pwd')
has the same result. How do I get what I want?
I should add that it works as expected on one of my hetzner boxes with php 5.3. It doesn't work on my bluehost account with php 5.2. I want it to work everywhere.
(See http://github.com/guaka/worsh for the use case.)