I want to run mongodb from PHP 5.6. I have downloaded it from https://github.com/mongodb/mongo-php-library. I run the command composer require "mongodb/mongodb=^1.0.0"
and what about the zip
file? Is there any easy method to install it?
I run this code
<?php
require 'vendor/autoload.php';
$connection = new MongoDB();
?>
and getting error:
Fatal error: Class 'MongoDB' not found in C:\wamp64\www\
new MongoDB\Client("mongodb://localhost:27017");
works fine but for saving the document $collection->insert($document);
gives the error insert method is not found