linux,
windows,
php扩展,
无框架php7
//插入数据到mongodb,的test数据库,runoob表中 $bulk = new MongoDB\Driver\BulkWrite; $document = ['_id' => new MongoDB\BSON\ObjectID, 'name' => '菜鸟教程']; $_id= $bulk->insert($document); var_dump($_id); $manager = new MongoDB\Driver\Manager("mongodb://localhost:27017"); $writeConcern = new MongoDB\Driver\WriteConcern(MongoDB\Driver\WriteConcern::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