将CI 2.x中的项目迁移到3.x后,显示以下错误,其中我使用了mongo db,这在codeigniter版本2中工作正常,
消息:无法解析MongoDB URI:'mongodb://'.URI中的主机字符串无效.
Db配置
// Generally will be localhost if you're querying from the machine that Mongo is installed on
$config['mongo_host'] = "localhost";
//$config['mongo_host'] = "xxxxxxxxx.compute.amazonaws.com";
// Generally will be 27017 unless you've configured Mongo otherwise
$config['mongo_port'] = 27017;
// The database you want to work from (required)
$config['mongo_db'] = "test_p1";
// Leave blank if Mongo is not running in auth mode
$config['mongo_user'] = "";
$config['mongo_pass'] = "";
// Persistant connections
$config['mongo_persist'] = TRUE;
$config['mongo_persist_key'] = 'ci_mongo_persist';
// …Run Code Online (Sandbox Code Playgroud)