PHP: How to set current working directory to be same as directory executing the script
chdir(__DIR__);
or
chdir(dirname(__FILE__));
(see chdir and magic constants).
But that should be by default.
chdir(__DIR__);
or
chdir(dirname(__FILE__));
(see chdir and magic constants).
But that should be by default.