MongoCollection::aggregate() is undefined in Heroku PHP using MongoHQ
问题 I'm getting the following error when using MongoDB's aggregate() function in a PHP code. This code perfectly works on my local setup which is running MongoDB 2.2.3 PHP Fatal error: Call to undefined method MongoCollection::aggregate() in /app/www/page.php on line 52, referer: http://referrer.url Code foreach($cats as $key=>$val){ $cats2[$val['lable']] = $myCollection->aggregate( array( array('$match' => array('user_id' => $user_id )), array('$unwind' =>"\$data"), array('$match' => array('data