上传Codeigniter
内置的应用程序我面临错误
“使用未定义的常量Panel_Controller - 假设'Panel_Controller”
defined('BASEPATH') OR exit('No direct script access allowed');
class Login_Controller extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->library('javascript');
$this->load->library('form_validation');
$this->load->library('email');
$this->load->library('session');
if($this->session->userdata('id'))
{
return redirect(Panel_Controller);
}
First load the url helper in your construct by
$this->CI->load->helper('url');
if($this->session->userdata('id')){
redirect('Panel_Controller');
}
首先,尝试制定路线
$route['dashboard'] = "Panel_Controller/index";
然后
if($this->session->userdata('id')){
redirect('dashboard');
}
要么
if($this->session->userdata('id')){
redirect('Panel_Controller/index', 'refresh');
}