MongoClient
PHP Manual

MongoClient::connect

(PECL mongoclient >=0.9.0)

MongoClient::connectConnects to a database server

说明

public bool MongoClient::connect ( void )

参数

此函数没有参数。

返回值

If the connection was successful.

错误/异常

Throws MongoConnectionException if it fails to connect to the database.


MongoClient
PHP Manual