blob: 560517663cb94986db622757dd87633df7ad8d29 (
plain) (
blame)
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
|
<?php
/***************************************
* Description:
* Autor: Robert Šmalc
* Created date: 22.01.2016
*****************************************/
/**
* Nastavimo vrsta okolja ali gre za produkcijo ali development/debugingp
* DEV: - prikažemo vse errorje
* - izpis spremenljiv z ukazom d() ali ddd()
* - blackscreen error display
*/
global $site_url;
if (in_array($site_url, [
'http://localhost/',
'http://1ka.dev/',
'http://1ka-framework.dev/'
])) {
define('ENVIRONMENT', 'dev');
} else {
define('ENVIRONMENT', 'production');
}
// Error reporting
if (/*ENVIRONMENT == 'dev' ||*/ isDebug()) {
error_reporting(E_ALL);
ini_set("display_errors", 1);
//ERROR blackscreen prikaz
if (class_exists('\Whoops\Run)')) {
$whoops = new \Whoops\Run;
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
}
} else {
error_reporting(0);
ini_set("display_errors", 0);
}
//DB connection
define('DB_TYPE', 'mysql');
define('DB_HOST', $mysql_server);
define('DB_NAME', $mysql_database_name);
define('DB_USER', $mysql_username);
define('DB_PASS', $mysql_password);
|