安装
linux,
windows,
php扩展,
代码使用
无框架php7
//插入数据到mongodb,的test数据库,runoob表中
$bulk = new MongoDBDriverBulkWrite;
$document = ['_id' => new MongoDBBSONObjectID, 'name' => '菜鸟教程'];
$_id= $bulk->insert($document);
var_dump($_id);
$manager = new MongoDBDriverManager("mongodb://localhost:27017");
$writeConcern = new MongoDBDriverWriteConcern(MongoDBDriverWriteConcern::MAJORITY, 1000);
$result = $manager->executeBulkWrite('test.runoob', $bulk, $writeConcern);
可视化
可以使用github开源web办可视化工具adminmongodb
git clone --depth=1 https://github.com/mrvautin/adminMongo.git
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
npm start