我試圖訪問MongoDB的探查PHP中我將在蒙戈客戶端使用相同的查詢:如何訪問PHP中的MongoDB配置文件?
$db = $mongo->selectDB('myapp_db');
$array = $db->execute('return db.system.profile.find();');
echo '<pre>' . print_r($array, true);
但我得到這個:
Array
(
[retval] => Array
(
[value] => DBQuery: myapp_db.system.profile -> undefined
)
[ok] => 1
)
分析已啓用並正常工作在客戶端。