Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am new to both PHP and mongoDB. I want to know if there is any way to run a PHP project having different files on a single mongoclient();

I have created one connection.php file which is used for connecting to database but whenever I include this same file in different files, it starts new mongodb server connection.

Is there any way that I can run complete project on single mongoDB client?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.