Download path: Http://downloads.mongodb.org/win32/mongodb-win32-i386-1.7.0.zip
Put a DB folder I was put to D disk, path: Ddb
Extract Mongodb-win32-i386-1.7.0.zip rename it to MongoDB put it in D disk
Open cmd input: d:mongodbbinmongod.exe–dbpath=d:db start Mongod Service
Open one more cmd input: D:mongodbbin>mongo.exe
The code is as follows |
Copy Code |
mongodb shell version:1.7.0 url:test connecting to:test Type ' exit ' to exit type ' help ' for help 5.d:mongodbbinmongod.exe-dbpath d:db-install Registers Windows service, haha to avoid trouble later, start 6 every time. d:mongodbbin>mongo.exe MongoDB Shell version:1.7.0 url:test< br> connecting to:test type ' exit ' to exit type ' help ' for help > Use test switched to DB Test > Db.foo.save ({hello:1,word:2}) br> > Db.foo.find () {"_id": ObjectId ("4bc1854e0140000000006f05″"), "Hello": 1, "word": 2} |
7. Download the corresponding version DLL file in Http://cn.php.net/manual/en/mongo.installation.php#mongo.installation.nix.
such as: Http://downloads.mongodb.org/mongo-latest-php5.2vc6ts.zip
8. Copy the Php_mongo.dll to the PHP installation directory under the etc below directory
9. Restart Apache or Nginx
10. View Phpinfo
Mongo
The code is as follows |
Copy Code |
MongoDB Support Enabled Version 1.0.7 |