php - Codeigniter: $_SESSION doesn't work on hosting server -
code works fine on localhost giving error when moved project hosting server. says
severity: notice --> undefined variable: _session
i using codeigniter 2.1.3. double checked $autoload['libraries'] = array('database','session');
in autoload.php
$_session not available until session_start() called. recommend using native ci session class function ($this->session->userdata('some_data')) instead of using default php sessions. ci doesn’t use php session’s , instead rely’s on cookies. amend notice can add session_start() index.php file if wish continue doing.
Comments
Post a Comment