public function admin_login()
{
$this->form_validation->set_rules('email','E-mail','required|trim');
$this->form_validation->set_rules('password','Password','required');
$this->form_validation->set_error_delimiters("<p class='text-danger'>"," </p>");
if($this->form_validation->run())
{
$email=$this->input->post('email');
$password=$this->input->post('password');
$link='http://api.amid.tech/admin/'.$email.'/'.$password;
$data = (array) json_decode(file_get_contents($link,true));
if($email== $data['email'] && $password== $data['password'])
{
var_dump($data = (array) json_decode(file_get_contents($link,true)));
echo $userid=$this->session->set_userdata('name',$data);
exit;
$this->load->view('admin/dashboard');
}
else
{
// echo"false";
$this->load->view('index');
//echo validation_errors('');
}
}
}
我想通過API我想設置會話ID
你會得到什麼類型的錯誤/不良行爲? – roadrunner66
它顯示數組,但空數組沒有在會話中設置ID – falak
爲什麼這個問題是在CSS,HTML標記? –