PHP Classes

File: examples/config.php

Recommend this page to a friend!
  Classes of Anjan Bhowmik   PHP MySQL PDO class   examples/config.php   Download  
File: examples/config.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP MySQL PDO class
Execute general purpose MySQL queries using PDO
Author: By
Last change: Update of examples/config.php
Date: 9 months ago
Size: 522 bytes
 

Contents

Class file image Download
<?php

    ini_set
( 'display_errors', TRUE );
   
error_reporting( E_ALL );
   
   
define('DB_HOST','localhost');
   
define('DB_NAME','employees');
   
define('DB_USER','root');
   
define('DB_PASS','password');
   
define('DB_PORT',3306);
   
    require_once(
'../class.MySqlPDO.php');
   
    try {
       
       
MySqlPDO::getInstance()->connect(DB_NAME,DB_USER,DB_PASS,DB_HOST,DB_PORT);
       
    } catch (
Exception $ex) {
       
        echo
'Failed to connect to database';
        exit();
       
    }