我无法使用PHP连接到MongoDB

问题描述 投票:-1回答:1

我的问题是我无法使用PHP连接到MongoDB。通常,此类问题与“ ext”文件夹中的错误* .dll文件有关。我检查了一下我要添加的* .dll文件是否正确,因为它与我的PHP版本兼容。我在屏幕快照中附加了配置的所有步骤。您对我有什么建议吗?

我如何尝试连接PHP代码(代码部分):

<?php
$connection = new MongoClient();
$db = $connection->database;
$collection = $db->collection;

...

?>

((我尝试更改为MongoDB \ Client等,但是没有用)

PHPinfo

PECL MongoDB driver for PHP

PECL MongoDB driver for PHP

Adding *.dll file to ext folder

Adding extension to php.ini

Mongo in PHPinfo

Fatal error

php database mongodb nosql database-connection
1个回答
0
投票

错误的问题,您需要详细介绍更多信息,向我们展示您的代码,与dll无关。

© www.soinside.com 2019 - 2024. All rights reserved.