<?php $config["host"] = "localhost"; $config["user"] = ""; $config["pass"] = ""; $config["port"] = 27017; $config["dbname"] = "test"; $config['persist'] = TRUE; $config['persist_key'] = 'ci_mongo_persist'; /*End of mongo_config.php*/
3. MyMongoDemo.php文件: