CI,session加载错误

2017/3/14 11:52:44

Category 软件技术 Tag php,ci,session

新换了服务器后出现如下错误:

A PHP Error was encounteredSeverity: Warning

Message: mkdir() [function.mkdir]: Invalid argument

Filename: drivers/Session_files_driver.php

Line Number: 117

Backtrace:

File: E:ampapachehtdocsmvcapplicationcontrollersuser.php

Line: 75

Function: library

File: E:ampapachehtdocsmvcindex.php

Line: 292

Function: require_once


An uncaught Exception was encounteredType: Exception

Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.

Filename: E:ampapachehtdocsmvcsystemlibrariesSessiondriversSession_files_driver.php

Line Number: 119

Backtrace:

File: E:ampapachehtdocsmvcapplicationcontrollersuser.php

Line: 75

Function: library

File: E:ampapachehtdocsmvcindex.php

Line: 292

Function: require_once

---------------------------------------------------------------

解决方法,修改application/config/config.php中设置:


$config['sess_save_path'] =BASEPATH.'../'.'session_file';