summaryrefslogtreecommitdiffstats
path: root/application/libraries/Customautoloader.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/libraries/Customautoloader.php')
-rw-r--r--application/libraries/Customautoloader.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/application/libraries/Customautoloader.php b/application/libraries/Customautoloader.php
index 1904977d7..91be09066 100644
--- a/application/libraries/Customautoloader.php
+++ b/application/libraries/Customautoloader.php
@@ -16,11 +16,16 @@ class CustomAutoloader{
public function loader($className)
{
- $path = APPPATH.str_replace('\\', DIRECTORY_SEPARATOR, $className).'.php';
- if (file_exists($path)) {
- require $path;
- return;
+ $base_paths = array(
+ APPPATH,
+ );
+
+ foreach ($base_paths as $base_path) {
+ $path = $base_path.str_replace('\\', DIRECTORY_SEPARATOR, $className).'.php';
+ if (file_exists($path)) {
+ require $path;
+ return;
+ }
}
}
}
-?>