Welcome Guest, Not a member yet? Register   Sign In
second MY_ controller not working
#1

[eluser]murichej[/eluser]
application/core/MY_Controller.php
Code:
<?php
if (! defined('BASEPATH')) exit ('No direct script access allowed');

class MY_Controller extends CI_Controller
{
    
    function __construct()
    {
        parent::__construct();
        
        ...
        
    }
    
}

application/core/MY_Controllerfront.php
Code:
<?php
if (! defined('BASEPATH')) exit ('No direct script access allowed');

class MY_Controllerfront extends CI_Controller
{
    
    function __construct()
    {
        parent::__construct();
        
         ...      
        
    }
    
}

and then I try to extend theese two

that one is working:
Code:
class Blog extends MY_Controller {

that one doesn't:
Code:
class Blog extends MY_Controllerfront {

i get
Quote:Fatal error: Class 'MY_Controllerfront' not found in C:\xampp\htdocs\MMUblog\application\controllers\front\blog.php on line 3

need help Sad
#2

[eluser]boltsabre[/eluser]
Check this out and let us know if it solves your problems, it's from Phil Sturgeon, he's like the god of CI!!!

http://philsturgeon.co.uk/blog/2010/02/C...ing-it-DRY
#3

[eluser]murichej[/eluser]
thanks, it's working!
#4

[eluser]boltsabre[/eluser]
No worries, glad to hear you're up and going!!!




Theme © iAndrew 2016 - Forum software by © MyBB