1: The following things should be the PHP programmer should understand , more detailed reference can be Baidu Google
MongoDB PHP Official Document http://us.php.net/manual/en/book.mongo.php
1.MongoDB is a separate server
2.MongoDB is document-based, not table-based
3.MongoDB Less schema
4. You don't need to learn a different language
5.MongoDB has good PHP support
1. MongoDB is a separate server
The code text is like MySQL and PostgreSQL, and MongoDB listens for connections. He provides the tools to ask, create, update and delete, theoretically, work like MySQL and PostgreSQL: link, process, and then close the connection.
2. Say goodbye to the lines and tables, welcome documents and Collectors
Instead of the tables and rows that store the data, MongoDB stores the data in the document. If we have an "article" with a title, it has multiple authors, a theme and a tag. All this looks like the following:
PHP Array (
' title ' = ' Hello World ', ' authors ' =>array (' John ', ' Sally ', ' Jim '), ' body ' = ' Hello World ', ' tags ' =>array (' tag1′, ' tag2′, ' tag3′);?>
2: Install PHP support
Need to download Php_mongo.dll https://github.com/mongodb/mongo-php-driver/downloads
Set php.ini on, open php.ini add the words below
Extension=php_mongo.dll
3: Management tool Selection
There are many kinds of management tools, you can refer to http://blog.nosqlfan.com/html/213.html
A management tool is recommended below:Rockmongo
Rockmongo is a PHP5-written MongoDB management tool.
Main Features:
Open source, and very easy to install
Multiple hosts can be managed, or multiple administrators can be added for each host
Password required to log in
can query the database
Powerful Collection Query function
Adding and deleting changes and copying individual rows
querying, creating, and deleting indexes
Clear Collection
Bulk Delete and modify data, but the latter requires a high version of the Php_mongo module support
View Collection Statistics
More useful features in the development.
rockmongo Download : http://code.google.com/p/rock-php/downloads/list
PHP-based MongoDB management tools are similar to phpMyAdmin management tools, and Phper is easy to get started with.
I downloaded the mongo-latest-php5.3vc6.zip, download the compressed package inside the Web is the admin interface.
Rename the Web folder to Rockmongo, put it in the development website file, my is put in E:\xampp\htdocs\rockmongo, open browser input: Http://localhost/rockmongo
The following login screen appears: The default Administrator and password are admin, support language Options and logon time settings .
Here is the Operation interface:
This is the management interface, programmers this is very easy to get started, the use of phpMyAdmin people, you know drip