여기서 리디렉션이 작동하지 않는 이유는 무엇입니까? 정의되지 않은 함수 redirect()가 호출됩니다.Codeigniter 리디렉션이 작동하지 않습니다.
class Login extends CI_Controller {
function index() {
parent::__construct();
$this->load->helper('form');
$this->load->helper('url');
$this->load->view('login_view');
}
function authenticate() {
$this->load->model('user_model');
$query = $this->user_model->authenticate();
if($query) {
$data = array(
'username' => $this->input->post('username'),
'is_logged_in' => true
);
$this->session->set_userdata($data);
redirect('/site/news_feed');
}
else {
$this->index();
}
}
}
이러한 "단점"의 예는 무엇입니까? – jondavidjohn