Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Estava desenvolvendo o sistema localmente e esta funcionando perfeitamente.
Porém subi os arquivos para o servidor e agora esta dando erro ao acessar uma página.
O arquivo que dá o erro é:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Admin_Controller extends CI_Controller {
protected $data = array();
protected $tpl;
protected $view;
public function __construct() {
parent::__construct();
if($this->ion_auth->is_admin()) {
$this->data['curr_user'] = $this->ion_auth->user()->row();
$this->data['title'] = $this->router->fetch_class();
$this->tpl = 'admin/tpl';
$this->view = 'admin/' . $this->router->fetch_class() . '/' . $this->router->fetch_method();
} else {
redirect('/');
}
}
}
class User_Controller extends CI_Controller {
protected $data = array();
protected $tpl;
protected $view;
public function __construct() {
parent::__construct();
if($this->ion_auth->in_group('user')) {
$this->data['curr_user'] = $this->ion_auth->user()->row();
$this->data['title'] = $this->router->fetch_class();
$this->tpl = 'user/tpl';
$this->view = 'user/' . $this->router->fetch_class() . '/' . $this->router->fetch_method();
} else {
redirect('/');
}
}
}
// talvez necessário quando implementar cadastro - modificar nomes
class Common_Auth_Controller extends CI_Controller {
protected $data = array();
protected $tpl;
protected $view;
public function __construct() {
parent::__construct();
if($this->ion_auth->logged_in()) {
$this->data['curr_user'] = $this->ion_auth->user()->row();
$this->data['title'] = $this->router->fetch_class();
$this->tpl = 'generic/tpl';
$this->view = 'admin/' . $this->router->fetch_class() . '/' . $this->router->fetch_method();
} else {
redirect('/');
}
}
}
/ End of file My_Controller.php /
/ Location: ./application/controllers/My_Controller.php /
O erro acontece na chamada da classe:
class Admin_Controller extends CI_Controller
Fatal error: Class 'Admin_Controller' not found in /home/isonlife/public_html/desenvolvimento/application/controllers/admin/dashboard.php on line 3
O arquivo esta no local correto e esta com a classe declada:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Dashboard extends Admin_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$this->template->load($this->tpl, $this->view, $this->data);
}
}
/ End of file dashboard.php /
/ Location: ./application/controllers/admin/dashboard.php /
Estou quebrando a cabeça.... Na minha maquina local funciona perfeitamente...
Alguem pode me dar uma ajuda??!!
Desde já agradeço.
Carregando comentários...