我在php / ext中导入了正确的mongodb.dll文件,并且还配置了php.ini,但似乎我无法通过我的php代码连接到mongodb。实施例
<?php
// connect to mongodb
$m = new MongoClient();
echo "Connection to database successfully";
// select a database
?>
致命错误:未捕获错误:在C:\ xampp \ htdocs \ date \ include \ db2.php中找不到类'MongoClient':3堆栈跟踪:在C:\ xampp \ htdocs \ date中抛出#0 {main}第3行的\ include \ db2.php