|
新手问题,我现在做一个登陆判断,成功后就直接跳转另外一个页面,在CI里面应该是控制器的跳转,然后控制器载入视图,代码如下
function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->database();
$this->load->helper('url');
}
function index()
{
$this->load->view('sys_login');
}
function post()
{
$this->load->database();
$this->load->helper('url');
$username = $this->input->post('username',true);
$password = $this->input->post('password',true);
if($username&&$password)
{
redirect('/index');
}
}
index.php代码
function index()
{
$this->load->view('sys_index');
}
但是我这样登陆一下,直接跳转到404错误页面了,请问如何解决
|
|