Page 1 of 1

pathname of script in cli

Posted: Thu Oct 01, 2015 7:02 pm
by chris
Hi,

I want to get the path of a php script I'm running in cli.

I tried __FILE__,
but it only gives the file name.

Re: pathname of script in cli

Posted: Thu Oct 01, 2015 7:03 pm
by chris
Oeps too fast

already found it: __DIR__

:D