Longhorn PHP 2019 Schedule


Please answer this simple SPAM challenge: zero plus five?
(Example: nine)

The Note You're Voting On

9 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