connect mongodb with php
To use mongodb with php you have to use mongodb php driver. Kindly follow below to download the latest mongodb php driver.
https://s3.amazonaws.com/drivers.mongodb.org/php/index.html
After downloading unzip the file put php_mongo.dll into php extesion directory.
And add below line into your php.ini file
extension = php_mongo.dll
To test its working or not execute below line of code on browser
<?php
// connect to mongodb
$m = new MongoClient();
echo "Connection to database successfully";
// select a database
$db = $m->mydb;
echo "Database mydb selected";
?>
Also in PHP:
- Laravel Eloquent, group by month/year
- artisan route:list
- array get only the value without duplicate
- check if char exists in string php
- echo console.log
- check if character in string php
- disable admin bar wordpress
- collection empty laravel
- array splice php
- check string contain symbol in php
- find string pos
- desired date in pgp
- Illuminate\Database\QueryException SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
- Created Migration: laravel
- clear database cache laravel command
- convert to format date php
- base64 php encode decode
- executar comando linux php
- datetime::timeformat php
- array_reverse in php
- array value unique php
- console.log. php print
- catch multiple exception php
- composer remove laravel