-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.php
executable file
·53 lines (41 loc) · 1.27 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
// setting the output buffer
ob_start();
//error handling
ini_set('display_errors' , 1);
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT);
//turn off register globals
ini_set('register_globals' , 0);
//define app constants
//Shortcuts
define('DS' , DIRECTORY_SEPARATOR);
define('PS' , PATH_SEPARATOR);
//domaine related constants
define( 'HOST_NAME' , 'http://' . $_SERVER['HTTP_HOST'] . '/');
//paths
define('APP_PATH' , realpath(dirname(__FILE__)) . DS );
define( 'TEMPLATE_PATH' , APP_PATH . 'templates' . DS);
define( "LIB_PATH" , APP_PATH . 'lib' . DS);
define( "MODELS_PATH" , APP_PATH . 'models' . DS);
define( "VIEWS_PATH" , APP_PATH . 'views' . DS);
//DB credentials
// define('DB_HOST' , 'sql2.freesqldatabase.com');
// define('DB_NAME' , 'sql2283442');
// define('DB_USER' , 'sql2283442');
// define('DB_PASS' , 'kM3%iN7%');
define('DB_HOST' , '127.0.0.1');
define('DB_NAME' , 'cafeteria_system');
define('DB_USER' , 'Gom3a');
define('DB_PASS' , '123456');
//setting new path
$path = get_include_path() . PS . LIB_PATH . PS . MODELS_PATH;
set_include_path($path);
//adding autoloading
// require_once('./lib/dbConnection.php');
function __autoload($class){
require_once($class . '.php');
}
$dbh = DBConnection::getInstance();
//end buffer and send output
ob_flush();
?>