/
app.php
34 lines (25 loc) · 797 Bytes
/
app.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
<?php
INCLUDE_ONCE "config.php";
INCLUDE_ONCE "utils.php";
INCLUDE_ONCE LIBRARIES_PATH . "classloader.class.php";
$classLoader = new ClassLoader(ROOT_PATH);
$classLoader->register();
use Jip\Library\Session;
if (DEBUG_MODE) {
ini_set('display_errors', 1);
error_reporting(E_ERROR | E_WARNING | E_PARSE);
} else {
ini_set('display_errors', 0);
error_reporting(E_ERROR | E_WARNING | E_PARSE);
}
session_start();
/**
* Set default language to german if ending of domain is .de and it is not set already
*/
if (preg_match("/.*\.de$/", $_SERVER["SERVER_NAME"])) {
Session::setDefaultLanguage("de");
} else {
Session::setDefaultLanguage("en");
}
Session::get();
?>