PHP Classes

File: init.php

Recommend this page to a friend!
  Classes of Sam Stevens   MySQL Abstractor   init.php   Download  
File: init.php
Role: Example script
Content type: text/plain
Description: Example Includer Script
Class: MySQL Abstractor
MySQL database abstraction layer
Author: By
Last change: Made a little clearer on how to use
Date: 17 years ago
Size: 674 bytes
 

Contents

Class file image Download
<?php
session_start
();
header("Cache-control: private"); //IE 6 Fix
require("DBAL.Class.php");
require(
"Settings.php");
$SQLHost = "<Host>";
$SQLUser = "<User>";
$SQLPass = "<Pass>";
$SQLDataBase = "<Database>";
$SQLDebug = true;
$SQLDebugLevel = 2; 1= fatal errors, 2= errors, 3= information
$db
= null;
try
{
   
$db = new DBALayer($SQLHost,$SQLUser,$SQLPass,$SQLDataBase, $SQLDebug, $SQLDebugLevel);
}
catch (
Exception $e)
{
    die (
$e->GetMessage());
}
function
LoadClass($file)
{
   
$file = $file.".Class.php";
    require(
$file);
}
/*
 * Load Classes Here
 */
LoadClass("DBInteraction");
LoadClass("Settings");

$setting = new Settings();

?>