PHP 7.2.0 Beta 1 Released

Voting

Please answer this simple SPAM challenge: max(one, zero)?
(Example: nine)

The Note You're Voting On

Wade
7 years ago
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.

<< Back to user notes page

To Top