1
これは、PHPでの私のコードphpを使用してmongodbテーブルからデータを取り出すには?
public function showData(){
$m = new MongoClient();
$db = $m->newdb;
$collection = $db->createCollection("signup");
$data = $collection->find();
echo "asdf<pre>";print_r($data);exit;
}
ですが、私は、シェル内のデータを見ることができますが、それは空の配列を返しています。私たちは、コマンドdb.signup.find().forEach(printjson);