我在macOS sierra上。 我使用brew安装了mongodb,并使用$ mongod
命令启动它。 另外,mongo shell运行良好,没有任何运气!
问题是,当我使用此代码来创建连接:为无法创建MongoDb客户端对象! [Class'MongoDB Client'not found]
$mongoClient = new MongoClient();
我得到这个错误
$mongoClient = new MongoDB\Client();
相同:
Fatal error: Uncaught Error: Class ... not found in ...
乐趣点是当我试图使用mongo驱动程序管理器它的作品!
$manager = new MongoDB\Driver\Manager("mongodb://localhost:27017");
我敢肯定,我在我的php.ini文件extension=mongo.so
和我检查的phpinfo()和显示MongoDB是装的,我can'f找到固定它的解决方案! 最新的问题?
这就是“低水平”的依赖已安装。这是一个“先决条件”,但是您希望** [作曲家安装为“userland”工作。](http://php.net/manual/en/mongodb.tutorial.library.php) –