Welcome Guest, Not a member yet? Register   Sign In
extend MY_Controller
#11

[eluser]InsiteFX[/eluser]
It has something to do with the new CI 2.0, but for some reason it does not load all of the application core classes.

I would double check your __autoload and make sure it matches the one I posted for you, it is an update to Phil's __autoload.

I use HMVC and it uses SPL_Autoload so no need for me to use the __autoload in config.

InsiteFX
#12

[eluser]theprodigy[/eluser]
At work, we use Modular Extensions, so that may be the difference. ME might have something in it that is allowing it to work.
#13

[eluser]Zawardo[/eluser]
[quote author="InsiteFX" date="1306025400"]
I would double check your __autoload and make sure it matches the one I posted for you, it is an update to Phil's __autoload.
[/quote]

You were right Smile
i updated. Thanx again.
#14

[eluser]Unknown[/eluser]
[quote author="InsiteFX" date="1306017226"]I dont know if they have fixed it but before you had to use an autoload in the config.php
Code:
/*
| -------------------------------------------------------------------
|  Native Autoload - by Phil Sturgeon. New Version!
| -------------------------------------------------------------------
|
| Nothing to do with config/autoload.php, this allows PHP autoload to work
| for base controllers and some third-party libraries.
|
| If using HMVC you do not need this! HMVC will autoload.
|
| Place this code at the bottom of your application/config/config.php file.
*/
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;
        }
    }
}

InsiteFX[/quote]


Thank you for this! Works perfectly (CI 2.0.2)
#15

[eluser]InsiteFX[/eluser]
Just a NOTE here! If you use HMVC it uses SPL_Autoload so you would not need this...

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB