Наш чат в Telegram для обмена идеями, проектами, мыслями, людьми в сфере ИТ г.Ростова-на-Дону: @it_rostov


(PECL mongo >=0.9.0)

Mongo::close — Closes this connection


public bool Mongo::close ( void )

This method does not need to be called, except in unusual circumstances. The driver will cleanly close the database connection when this Mongo instance goes out of scope.

If objects do not go out of scope between requests, you may wish to call this method at the end of your program to keep old connections from hanging around. However, it is probably more efficient use a persistent connection, which will automatically create a connection if needed and use it for as many requests as possible.

If you are connected to a replica set, close() will only close the connection to the primary.

Список параметров

У этой функции нет параметров.

Возвращаемые значения

Returns if the connection was successfully closed.

Описание класса mongo, примеры использования класса mongo.

Смотрите также:
Описание на ru2.php.net
Описание на php.ru