From 9f1bd0ca3fec9dc5352a93322e4c6b04d6f5ef68 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 3 Apr 2012 08:22:18 -0500 Subject: [PATCH] chdir if the request is not from the web. --- paths.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paths.php b/paths.php index 152a4f79..afc2bf58 100644 --- a/paths.php +++ b/paths.php @@ -13,6 +13,14 @@ // -------------------------------------------------------------- if ( ! isset($web)) $web = false; +// -------------------------------------------------------------- +// Change to the current directory if not from the web. +// -------------------------------------------------------------- +if ( ! $web) +{ + chdir(__DIR__); +} + // -------------------------------------------------------------- // Define the directory separator for the environment. // --------------------------------------------------------------