PHP Classes

File: api/config/connection.php

Recommend this page to a friend!
  Classes of Boss Ibrahim Mussa   PHP School Management System with Student Payroll   api/config/connection.php   Download  
File: api/config/connection.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP School Management System with Student Payroll
Manage payments from school students
Author: By
Last change:
Date: 2 years ago
Size: 287 bytes
 

Contents

Class file image Download
<?php
   
include 'config.php';
    try{
       
$connexion = new PDO("mysql:host=".HOST.";dbname=".DATABASE,USER,PASSWORD);
       
$connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    }catch(
Exception $ex){
        echo
"Error connection=>".$ex->getMessage();
    }