在写一个登陆的页面,刚把controller写了一点,load各种帮助类库和view,想先测一下这个目录下能不能显示,没想到碰到session问题
代码:
public function __construct()
{
parent::__construct();
session_start();
$this->load->helper('form');
$this->load->library('form_validation');
$this->load->library('session');
$this->load->model('login_database');
}打开页面报错:A PHP Error was encounteredSeverity: Warning Message: ini_set(): A session is active. You cannot change the session module's ini settings at this time Filename: Session/Session.php Line Number: 316 Backtrace: File: E:\workspace\php\application\controllers\authentication\user_authentication.php
Line: 17
Function: library
A PHP Error was encounteredSeverity: Notice Message: A session had already been started - ignoring session_start() Filename: Session/Session.php Line Number: 143 Backtrace: File: E:\workspace\php\application\controllers\authentication\user_authentication.php
Line: 17
Function: library
用的是CI3,在网上google了一下,说是去掉session_Start,可是去掉之后还是会报错, A PHP Error was encounteredSeverity: Warning Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php Line Number: 136
An uncaught Exception was encounteredType: Exception Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created. Filename: E:\workspace\php\system\libraries\Session\drivers\Session_files_driver.php Line Number: 138
不知道怎么解决,求大佬帮助!
|