Welcome Guest, Not a member yet? Register   Sign In
Extended Controller not working on App Engine
#1

(This post was last modified: 02-27-2015, 04:24 AM by mr_pablo.)

In my CI 2.2 setup, I have MY_Controller extending CI_Controller, then Admin_Controller extend MY_Controller.

On LAMP/WAMP, this worked perfectly, using the following code in config.php to load the files

Code:
function __autoload($class)
{
    if (strpos($class, 'CI_') !== 0)
    {
        if (file_exists($file = APPPATH . 'core/' . $class . EXT))
        {
            include $file;
        }

        elseif (file_exists($file = APPPATH . 'libraries/' . $class . EXT))
        {
            include $file;
        }
    }
}

I have recently moved to using Googles App Engine and now I am having issues with getting the Admin_Controller to work. MY_Controller seems to load fine, no issues.

I even tried renaming the admin controller to MY_Admin_Controller, but that didn't help.

Any ideas?

EDIT - right, so I tried adding "include_once( APPPATH . 'core/Admin_Controller.php' );" to the autoload function. No luck. I then added it to the top of the admin index.php script, and it works. So, why isn't it being autoloaded?
Reply


Messages In This Thread
Extended Controller not working on App Engine - by mr_pablo - 02-27-2015, 03:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB