Reputation: 43501
I have a CLI PHP script and I need to know what directory it's currently running in. Because of some operations, including getcwd()
, the directory has changed a bit.
How can I do this?
Upvotes: 1
Views: 49
Reputation: 8837
Perhaps you want: dirname(__FILE__)
http://php.net/manual/en/language.constants.predefined.php
Upvotes: 0