php - Display error message from Admin_Controller -
i had create core/admin_controller.php , created page controller when run page controller there error displaying "fatal error: class 'admin_controller' not found in d:\xampp\htdocs\myproject\application\controllers\admin\page.php on line 4"
class admin_controller extends my_controller { function __construct() { parent::__construct(); } }
defined('basepath') or exit('no direct script access allowed'); class page extends admin_controller { public function __construct() { parent::__construct(); $this->load->model('admin_m'); $this->load->model('page_m'); } public function index(){ $data['title'] = 'press release'; $data['page'] = $this->page_m->show_list(); $this->load->view(theme_dir_admin.'common/admin_header'); $this->load->view(theme_dir_admin.'page/list', $data); $this->load->view(theme_dir_admin.'common/admin_footer'); } }
core/admin_controller.php
class admin_controller extends ci_controller { function __construct() { parent::__construct(); } }
and
config/config.php
$config['subclass_prefix'] = 'admin_';
Comments
Post a Comment