The configuration process of the combination of MongoDB and PHP under the window system
By learning how to use and deploy MongoDB, I tried how to apply mongodb to php programs. 1. Preparatory work First of all, mongodb must be prepared, deployed according to relevant methods, and the service can run normally. For beginners, you can refer to the tutorial of “Code Farmer”, which is very detailed and practical. the d:\mongodb\bin>net start MongoDB Preparation of php and apache environment If you are lazy, you can go to XAMPP to download an integrated installation package, including php/apache/mysql, etc., and the environment is already integrated. You only need to put the php program under htdocs/ to access it. XAMPP address: http://www.apachefriends.org/zh_cn/xampp-windows.html (complete installation and application) the The drivers of mongodb are some dynamic link library files. the Address: https://s3.amazonaws.com/drivers.mongodb.org/php/index.html the 2. The integration of mongodb and php (1). Find the ext directory in xampp: For example, mine is installed on the D drive: D:\xampp\php\ext (2). Copy the downloaded dynamic link library file to the above directory D:\xampp\php\ext “ php_mongo-1.4.5-5.5-vc11.dll copy to D:\xampp\php\ext (3). Modify the configuration of php.ini Location: D:\xampp\php.ini Open this file with an editor and find ; Windows Extensions “ And add a line of configuration at the end of this block (approximately:…