简体   繁体   English

PHP:创建Mongo数据库

[英]PHP: Create Mongo database

At following line i'm trying to create mongo database backup at specified path but it's not working. 在下面的行中,我试图在指定的路径上创建mongo数据库备份,但是它不起作用。 let me know what's wrong. 让我知道怎么了。 Thank you. 谢谢。

 $command = "mongodump --db test --dbpath D:/dump/db";
     $results = shell_exec($command);

Note: 注意:

     shell_exec($command); does not work for windows!

It does not return result or might it returns some error. 它不返回结果,或者可能返回一些错误。 shell_exec work only for linux based systems like ubuntu. shell_exec仅适用于基于Linux的系统,例如ubuntu。

if you still have some issues just hit mongodump command directly over your command prompt. 如果仍然有问题,请直接在命令提示符下点击mongodump命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM