Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2. $connection = new MongoClient( "mongodb://mongodb:27017" );
  3.  
  4. $collection = $connection->selectCollection('fbliteDB', 'members');
  5. if (!$collection) {
  6. echo 'not connected to collection';
  7. exit;
  8. }
  9. $cursor = $collection->find();
  10. foreach ($cursor as $doc) {
  11. var_dump($doc);
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement