Hi I have been trying to connect to mongodb from php. I am using the below dll:
php_mongo-1.6.8-5.5-vc11-x86_64.dll
I was going through one of the threads on stackoverflow PHP MongoDB: Fatal Error: Class 'Mongo CLient' not found ,which mentions that MongoClient() class has been deprecated. Instead of it now we need to use something like this:
$m = new MongoDB\Driver\Manager();
I have the following code:
<?php
$m = new MongoDB\Driver\Manager();
$db = $m->testdb;
echo "Connected to db";
?>
Still I am getting error for class not found. Does anyone have any idea about it? Or do I have to import something? Please help.