Do not know why, search related content is a few years ago content, the new point is not, so they give the resource link is not to use is the content of old, and most people take the same approach, as the key point is a word with, because of their negligence, I last night Leng white busy a night, Luckily I finally found it in the morning, and now I'm going to post the process.
I am using XAMPP with PHP, version is PHP 5.6.15, the focus is your version of PHP, and XAMPP does not matter.
The first step, print your phpinfo (), look at two content
One is your PHP version, the other is thread safe, followed by the two to select the corresponding DLL file
The second step is to go to the official PHP website to download the extension file, but one thing I don't quite understand is, what's the difference between MONGO and MongoDB? Why two drive is not the same, anyway, I have both installed, the method is the same
Drive of Https://pecl.php.net/package/mongodb MongoDB
Drive of Https://pecl.php.net/package/mongo MONGO
The following only take MongoDB to do the example, the method is the same
I am a Windows operating system, so this link is only for Windows, where you can see a variety of newer versions, and then click here
Select the files to download here
pay attention to .... Here's the point .... The general idea is that x86 is 32 bit and x64 is the operating system is 64, in fact, is that you installed PHP is 64 or 32, in general, PHP is 32, as to how to view, I do not know, Big deal Two try it all over again. Based on whether your previous thread is safe to choose, then download
The third step is to put the Php_mongodb.dll in the downloaded extract file into the Ext folder in the PHP installation file
Fourth step, modify PHP.ini, add the following sentence in it
Extension=php_mongodb.dll
Then restart the xampp on the line, add Php_mongo.dll method is to the top of the second step to the fourth step to repeat the line, after the Extension=php_mongo.dll plus Extension=php_mongodb.dll And then it's done.