본문 바로가기

프로그래밍 일반/PHP

mongodb php 연결

https://www.php.net/manual/en/mongo.tutorial.php

 

PHP: Tutorial - Manual

comedy;// select a collection (analogous to a relational database's table)$collection = $db->cartoons;// add a record$document = array( "title" => "Calvin and Hobbes", "author" => "Bill Watterson" );$collection->insert($document);

www.php.net

 

https://www.youtube.com/watch?v=FwMwO8pXfq0

 

 

몽고DB는

The MongoDB\Driver\Manager class 이걸로 연결해야한다.

https://www.php.net/manual/en/class.mongodb-driver-manager.php

 

PHP: MongoDB\Driver\Manager - Manual

var_dump()ing a MongoDB\Driver\Manager will print out various details about the manager that are otherwise not normally exposed. This can be useful to debug how the driver views your MongoDB setup, and which options are used. The above example will output

www.php.net

 

우분투에서 연결할 시에

https://websiteforstudents.com/install-mongodb-on-ubuntu-16-04-17-10-18-04-with-nginx-php-fpm-7-2-support/

 

Install MongoDB on Ubuntu 16.04 | 17.10 | 18.04 with Nginx, PHP-FPM 7.2 Support | Website for Students

For developers using Nginx and PHP with MongoDB database in the backend, MongoDB PHP drivers will be required to enable PHP support… Without the drivers, PHP based applications and website using…

websiteforstudents.com

 

https://docs.mongodb.com/drivers/php/

 

https://docs.mongodb.com/drivers/php/

First, make sure you have a recent version of PHP installed on your system. See the official PHP manual for download and installation instructions. Install the PHP MongoDB Extension before installing the PHP Library for MongoDB. You can install the extensi

docs.mongodb.com

 

'프로그래밍 일반 > PHP' 카테고리의 다른 글

[NodeJS] https적용 express  (0) 2020.06.04
Node.js nodemon설정  (0) 2020.05.28
[CSS] position : fixed 관련 문제  (0) 2020.05.14
CSS개념잡기  (0) 2020.05.14
[php] CK에디터 다운로드 미리보기 Lorem삭제하기  (0) 2020.05.07