Connect to MongoDB

suggest change

Create a MongoDB connection, that later you can query:

$manager = new \MongoDB\Driver\Manager('mongodb://localhost:27017');

In the next example, you will learn how to query the connection object.

This extension close the connection automatically, it’s not necessary to close manually.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents