I am making a mongodb
connection but when I access my config.php
it give me the error
"mongodb driver not found".
config.php
try { $connectionString = "mongodb://" . $m4-live-mongodb;
$options = array( 'username' => 'hello', 'password' => 'world' );
// adding support for php 5.4 and uppper
if (($mv = phpversion('mongo')) === false)
{
throw new Exception("Mongo db driver not found");
}
elseif (version_compare($mv, '1.3.0', '<'))
{
$mongo = new Mongo($connectionString, $options);
} else
{
$mongo = new MongoClient($connectionString, $options);
} $mC = $mongo->$db->$collection; var_dump($mC);
} catch (exception $e)
{
echo $e->getcode().'<hr>'; echo $e->getmessage();
}