PHP - Manual: MongoClient::connect
2024-12-24
(PECL mongo >=1.3.0)
MongoClient::connect — 连接到数据库服务器
This extension that defines this method is deprecated. Instead, the MongoDB extension should be used. There is no equivalent for this method in the new extension.
此函数没有参数。
连接是否成功。
如果连接失败将会抛出 MongoConnectionException 的异常。