PHP Classes

File: includes/config.php

Recommend this page to a friend!
  Classes of Faris AL-Otabi   Netflix Clone   includes/config.php   Download  
File: includes/config.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Netflix Clone
Manage a library of movies to rent like Netflix
Author: By
Last change:
Date: 2 months ago
Size: 334 bytes
 

Contents

Class file image Download
<?php
ob_start
(); // Turns on output buffering
session_start();

date_default_timezone_set("Europe/London");

try {
   
$con = new PDO("mysql:dbname=netflix;host=localhost", "root", "");
   
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
}
catch (
PDOException $e) {
    exit(
"Connection failed: " . $e->getMessage());
}