略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: MongoDB::forceError

2024-12-21

MongoDB::forceError

(PECL mongo >=0.9.5)

MongoDB::forceErrorCreates a database error

说明

public MongoDB::forceError ( void ) : bool

This method is not very useful for normal MongoDB use. It forces a database error to occur. This means that MongoDB::lastError() will return a generic database error after running this command.

This command is identical to running:

<?php

public function forceError() {
    return 
$this->command(array('forceerror' => 1));
}

?>

参数

此函数没有参数。

返回值

Returns the database response.

更新日志

版本 说明
1.2.11 Emits E_DEPRECATED when used.
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/mongodb.forceerror.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3