In the past few days to participate in a creative marathon, although did not take any prize, the heavy participation
Finally have the opportunity to practice the MongoDB database, used to just own configuration to play
Author: The wind is coming.
TP already supports MongoDB database, here is a detailed description of the configuration and use of MONGO on TP.
(1) There is a bug in the original class of/think/model/mongomodel.class.php in the tp3.2.2 version. We need to add some code to the
In the past few days to participate in a creative marathon, although did not take any prize, the heavy participationFinally have the opportunity to practice the MongoDB database, used to just own configuration to playHere comes the wind.Environment:
The last few days to participate in a creative marathon, although not take any prize, heavy participation
Finally have the opportunity to practice MongoDB database, used to only configure themselves to play
The wind is coming. Stay Fox
Environment:
2, install (Windows only)Download the corresponding package to the official websiteExtract to D:mongodbCreate d:mongodbdata Drop Data file
3, Run MongoDBD:mongodbbin There are executable files, where Mongod.exe is the server side, Mongo.exe is the
Basic Tutorial: 1. Connect to the mongo database server. Syntax example :? Php $ connectionnewclientclient (); connect to the local database. The default port is 27017. That is, localhost: 27017 $ connectionnewclientclient (mongodb: example.com);
Link Database
Use the following code to create a database link $connection = new Mongo (); Link to localhost:27017
$connection = new Mongo ("example.com"); Link to remote host (default port)
$connection = new Mongo ("example.com:65432"); Custom
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.