summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 7003318ee..75c09435d 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -975,7 +975,15 @@ class CI_Loader {
*/
function _ci_autoloader()
{
- include_once(APPPATH.'config/autoload'.EXT);
+ if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT))
+ {
+ include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT);
+ }
+ else
+ {
+ include_once(APPPATH.'config/autoload'.EXT);
+ }
+
if ( ! isset($autoload))
{