在使用mongodb的过程中,出现报错:

Call to undefined method MongoDB\Driver\WriteConcern::isDefault()

经查询,是因为这个函数在最新版本中已经被移除。

解决方案是重新安装,mongoDB,PHPLIB和mongodbPHP对应的版本,版本配合规则如下:

PHP 使用 Mongodb driver:Call to undefined method MongoDB\Driver\WriteConcern::isDefault()


相关文章: