问题
Will I be able to connect to this database using php's php_mongo.dll driver?
If so, could you please provide some sample code as I was not able to get it in any forum?
回答1:
MongoDB requires its own driver.
In your case, the PHP driver is located here: http://php.net/manual/en/book.mongo.php
The instructions for installing it are on that page. There is also some sample code.
回答2:
I think that PDO is only for relational databases. There's no PDO driver for mongodb.
回答3:
There is list of databases which you can use with PDO driver: http://php.net/manual/en/pdo.drivers.php MongoDb is not among them.
来源:https://stackoverflow.com/questions/8255440/connecting-to-mongodb-using-pdo-driver