私信  •  关注

Nanhe Kumar

Nanhe Kumar 最近创建的主题
Nanhe Kumar 最近回复了
7 年前
回复了 Nanhe Kumar 创建的主题 » MongoDB和PHP点符号问题

如果你正在使用 MongoDB driver MongoDB PHP library

require 'vendor/autoload.php'; // include Composer's autoloader

$client = new MongoDB\Client("mongodb://localhost:27017");

$result = $client->your_database_name->SoManySins->find(array(),array('projection' =>array('_id'=>FALSE,'FactoryCapacity' => TRUE)));

foreach ($result as $entry){
    echo "<pre>";
    print_r($entry);
    echo "</pre>";
}