-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
29 lines (25 loc) · 970 Bytes
/
config.php
File metadata and controls
29 lines (25 loc) · 970 Bytes
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
<?php
error_reporting(E_ALL|E_STRICT);
define('DROOT', realpath(dirname(__FILE__)));
define('SEVERITY_DEBUG', 0);
define('SEVERITY_WARN', 1);
define('SEVERITY_CRIT', 2);
$CONFIG = array();
$CONFIG['SQL'] = array(
'dsn' => 'mysql:host=localhost;dbname=carrier_detect',
'user' => 'root',
'password' => '',
'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")
);
$CONFIG['LOG'] = array('enabled' => true, 'path' => DROOT.'/logs', 'severity' => SEVERITY_WARN);
$CONFIG['AUTH'] = array('realm' => 'My Realm', 'text' => 'You must be logged in to access this page!', 'users' => array('admin' => 'adminpw'));
$host = empty($_SERVER['HTTP_HOST'])?'':$_SERVER['HTTP_HOST'];
if (strrpos($host, ':80') === strlen($host)-3) {
$host = substr($host, 0, -3);
}
if (is_readable(DROOT.'/config/'.$host.'.php')) {
require_once DROOT.'/config/'.$host.'.php';
}
require_once DROOT.'/lib/functions.php';
spl_autoload_register('__class_loader');
?>