Skip to content

Instantly share code, notes, and snippets.

@MahdiMajidzadeh
Last active September 7, 2016 18:16
Show Gist options
  • Save MahdiMajidzadeh/7b210a5d2e9c69299174c1617122ce6e to your computer and use it in GitHub Desktop.
Save MahdiMajidzadeh/7b210a5d2e9c69299174c1617122ce6e to your computer and use it in GitHub Desktop.
Custom base controller in CI3
// put this code in first of config.php file in application/config
function __autoload($classname) {
if (strpos($classname, 'CI_') !== 0) {
$file = APPPATH . 'core/' . $classname . '.php';
@include_once($file);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment