Thanks for your reply, but luckily script worked and data was also
saved in .json file but somehow I was not getting right output.
here the out put of your shared code:
array(0) { } int(0)
but data saved in foo.json file:
{ "_id" : { "$oid" : "4f687deca3bcdf691b668bfe" }, "name" : "sara" }
Thanks for your reply.
On Apr 11, 6:16 pm, Kristina Chodorow <
krist...@10gen.com> wrote:
> Can you run:
>
> $output = array();
> $ret = null;
> exec("mongoexport-d test -c foo -o /web/www/cloud1/MongoDump/
> foo.json", $output, $ret);
> var_dump($output, $ret);
>
> and paste the result?
>
> On Apr 11, 10:48 am, dab <
cont...@danyalbutt.com> wrote:
>
>
>
>
>
>
>
> > Hello Guys,
>
> > I am trying to export mongodb collection viaPhpcode but looks like
> > it doesn't work,
> > Here is the code i am using.
>
> > exec("mongoexport-d test -c foo -o /web/www/cloud1/MongoDump/