PHP Classes

File: api/config/global.php

Recommend this page to a friend!
  Classes of Boss Ibrahim Mussa   PHP Payment Management System   api/config/global.php   Download  
File: api/config/global.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Payment Management System
Web application to manage company payments
Author: By
Last change:
Date: 1 year ago
Size: 945 bytes
 

Contents

Class file image Download
<?php
   
/**
     * allow configuration are store in this file
     * for database and and the connection
     * they declare as global tho to have full acces where ever in the project
     */
    // load configguration
   
$ini_array =(object) parse_ini_file("./config/config.ini", true);
   
$db_conf= (object)$ini_array->db_conf;

   
// database configuration setup
   
define("HOST", $db_conf->host);
   
define("DATABASE", $db_conf->database);
   
define("USER", $db_conf->user);
   
define("PASSWORD", $db_conf->password);
   
define("LANG","fr");
   
// inlude language file according to your configuraiton
   
include("./lang/" . checkFileExtension(LANG));
   
define("LANG_VALIDATE", $validation);
   
define("LANG_BOX_MESSAGE", $boxMessage);

   
//web root configaration

   
define('WEB_ROOT', str_replace('index.php', '', $_SERVER['SCRIPT_NAME']));
   
define('ROOT', str_replace('index.php', '', $_SERVER['SCRIPT_FILENAME']));