Make connection.php file and insert following code in it, include this file wherever you need database connection(i.e Model file)
<?php
try
{
$host=’localhost’;
$dbname=’YOUR_DATABASE_NAME’;
$user=’MYSQL_USERNAME’; //GENERALLY root FOR LOCALHOST
$pass=’MYSQL_PASSWORD’; //GENERALLY BLANK FOR LOCALHOST
$dbo=new PDO(“mysql:host=$host;dbname=$dbname”,$user,$pass);
$dbo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
echo “database config2 connection error!”;
file_put_contents(‘config2.txt’,$e->getMEssage(),FILE_APPEND);
}
?>
pcfmaadgio
28/07/2017 at 9:11 amtfJW63 uzwazitthnio, [url=http://mmkbjnuulake.com/]mmkbjnuulake[/url], [link=http://fgadkztqqtmp.com/]fgadkztqqtmp[/link], http://alfgloyhnsnj.com/