chdir if the request is not from the web.

This commit is contained in:
Taylor Otwell 2012-04-03 08:22:18 -05:00
parent ff484b7203
commit 9f1bd0ca3f
1 changed files with 8 additions and 0 deletions

View File

@ -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.
// --------------------------------------------------------------