運(yùn)行時(shí)配置

這些函數(shù)的行為受 php.ini 中的設(shè)置影響。

mongodb 配置選項(xiàng)
名字 默認(rèn) 可修改范圍 更新日志
mongodb.debug "" PHP_INI_ALL  
mongodb.mock_service_id "0" PHP_INI_ALL Available as of mongodb 1.11.0.

這是配置指令的簡(jiǎn)短說(shuō)明。

mongodb.debug string

This option can be used to enable or disable trace-level debug logging in the driver (and libmongoc).

Specify an empty string, "0", "off", "no", or "false" to disable logging.

Specify "stderr" or "stdout" to log to stderr or stdout, respectively.

Specify "1", "on", "yes", or "true" to log to a new temporary file within the default system temp directory (i.e. sys_get_temp_dir()).

Specify any other string to log to a new temporary file within that directory. If the directory cannot be used, the default system temp directory will be used instead.

注意:

Please note that the debug log can contain sensitive information, such as credentials to the MongoDB server and full documents written to or read from the server. Please review any debug logs before sharing them with other people.

mongodb.mock_service_id string

This option can be used to enable or disable mocking of the serviceId field in hello command responses.

Specify an empty string, "0", "off", "no", or "false" to disable mocking.

Specify "1", "on", "yes", or "true" to enable mocking.

注意:

This option is primarily intended for internal testing of load balancers and should not be used under normal circumstances.