MongoDB
在线手册:中文 英文
PHP手册

MongoDB::forceError

(PECL mongo >=0.9.5)

MongoDB::forceErrorCreates a database error

说明

public bool MongoDB::forceError ( void )

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.


MongoDB
在线手册:中文 英文
PHP手册