Introduction: This is a detailed page for installing MongoDB in PHP. It introduces the related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 336872 'rolling = 'no'>
(1) It is very easy to install MongoDB. You only need to download the compressed package and unzip the running command.
(2) install MongoDB PHP Extension
Download the PHP extension http://github.com/mongodb/developer-php-driver/downloadsbased on your PHP version. The following prompt is displayed:
1. vc6 is suitable for Apache and vc9 for IIS;
2. Thread safe is suitable for running PHP modules and non-thread safe is suitable for running CGI.
Modify PHP. ini, add: Extension = php_assist.dll, and restart the web server.
PS. Check whether the configuration is successful. You can write a phpinfo () to check whether MongoDB expansion is available. The installation is successful.
(3) create a folder for data storage and start mongod. For example, if we define it in D:/MongoDB/data, we can execute it in the CMD environment.
D:
CD MongoDB
Mongod -- dbpath = D: \ MongoDB \ data
(4) Common commands:
Mongod-MongoDB Server
Mongo-MongoDB Client
Mongodump-MongoDB dump tool-for backups, snapshots, Etc ..
Mongorestore-MongoDB restore a dump
Export export-export a single collection to test (JSON, CSV)
Mongoimportjson-import a JSON file into a collection
Program Files-utility for putting and getting files from MongoDB gridf
More articles on "installing MongoDB in PHP"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/336872.html pageno: 9.