From the command line, I can get the home directory like this:
~/
How can I get the home directory inside my PHP CLI script?
dirname(__DIR__);