インストール/設定
PHP Manual

実行時設定

php.ini の設定により動作が変化します。

Mongo 設定オプション
名前 デフォルト 変更可能 変更履歴
mongo.default_host NULL PHP_INI_ALL
mongo.default_port NULL PHP_INI_ALL
mongo.auto_reconnect NULL PHP_INI_ALL

PHP_INI_* モードの詳細および定義については どこで設定を行うのか を参照してください。

以下に設定ディレクティブに関する 簡単な説明を示します。

mongo.default_host string

Default hostname. "localhost" is recommended.

mongo.default_port string

The default TCP port number to use when connecting to the database server if no other port is specified. The database's default is 27017.

mongo.auto_reconnect bool

Whether to reconnect to the database if the connection is lost.


インストール/設定
PHP Manual