diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-02-07 11:54:06 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-02-07 11:54:06 +0100 |
commit | 01d1a5b936556f3b19786b7407cce11cf3bdb616 (patch) | |
tree | bfc7498f1c8f1ac77f89626b118e2ed8c481c2ba /index.php | |
parent | 4b679a786af0c35486ff8a32d67aea3a58134fdd (diff) |
CLI requests can now be run from any folder, not just when CD'ed next to index.php.
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -130,6 +130,13 @@ * Resolve the system path for increased reliability * --------------------------------------------------------------- */ + + // Set the current directory correctly for CLI requests + if (defined('STDIN')) + { + chdir(dirname(__FILE__)); + } + if (realpath($system_path) !== FALSE) { $system_path = realpath($system_path).'/'; |