简体   繁体   中英

PHP: Create Mongo database

At following line i'm trying to create mongo database backup at specified path but it's not working. 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.

if you still have some issues just hit mongodump command directly over your command prompt.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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