note 93383 deleted from features.commandline by cmb

From: Date: Sun, 30 Jun 2019 09:55:13 +0000
Subject: note 93383 deleted from features.commandline by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-211444@lists.php.net to get a copy of this message
Note Submitter: Wade ---- I've just found that the fact that the CLI does *not* change the current directory will make include() and require() calls with relative paths fail. This is because they are relative to the current directory, not to the current executing file, the documentation notwithstanding. In CGI mode, this is the same because it changes the current directory. One solution is to call the CGI binary rather than the CLI one. A better solutions is to use dirname(__FILE__) in your path names.

« previous php.notes (#211444) next »