Google-Clone-Script/config/config.php
2019-12-25 01:33:52 +05:30

14 lines
No EOL
337 B
PHP

<?php
ob_start();
try{
$servername = "localhost";
$dbname = "search_engine";
$username = "root";
$password = "";
$con = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOExeption $e){
echo "Connection failed: " . $e->getMessage();
}