Issue
I built a website using CodeIgniter. It works fine on localhost, but when I uploaded it on 000webhost it behaves incorrectly. Sessions are not setting .session and not working for live servers.
I called session in the constructor of the controller
$this->load->library('session');
I am setting its value in the method of the same controller like this
$session_array = array(
'Username'=>'admin',
'Logged In'=>'TRUE',
);
$this->session->set_userdata($session_array);
It works to set the value for just one time, but when I click on any other link it expires.
Solution
@navigator Please go to your website setting on 000Webhost and change the version of PHP to 7.0 it will work fine.
Answered By - shery089
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.