您是否使用这种确切的语法创建了会话 CI 表?我注意到它带来了许多问题。
--
-- Table structure for CodeIgniter ci_sessions.
--
DROP TABLE IF EXISTS `ci_sessions`;
CREATE TABLE IF NOT EXISTS `ci_sessions` (
`session_id` varchar(40) DEFAULT '0' NOT NULL,
`ip_address` varchar(16) DEFAULT '0' NOT NULL,
`user_agent` varchar(120) NOT NULL,
`last_activity` int(10) unsigned DEFAULT 0 NOT NULL,
`user_data` text,
PRIMARY KEY (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ;
-- -------------------------------------------------------------
-- `user_data` text, COMMENT - maximum length of 65535 characters.
-- `user_data` mediumtext, COMMENT - maximum length of 16777215 characters.
-- `user_data` longtext, COMMENT - maximum length of 4294967295 characters.