Answer the question
In order to leave comments, you need to log in
How to call a javascript mongodb function from php?
in php I call mongodb javascript function start()
$username="root";
$password="root";
$mongo_uri="mongodb://".$username.":".$password."@localhost";
$connection = new MongoClient( $mongo_uri );
$db = $connection->test;
$response = $db->execute("start()");
echo "<pre>"; print_r($response); echo "</pre>";
Array
(
[ok] => 0
[errmsg] => unauthorized
)
Answer the question
In order to leave comments, you need to log in
I will partially support the answer of Pavel Kizernis , but I will only advise a newer version - www.owlcarousel.owlgraphic.com It is much more functional.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question