-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.php
More file actions
45 lines (36 loc) · 1.01 KB
/
index.php
File metadata and controls
45 lines (36 loc) · 1.01 KB
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
<?php
error_reporting(E_ALL); // for reporting all errors set E_ALL
ini_set('display_errors', 1); // for reporting all errors set 1
ini_set("allow_url_fopen", 1);
ini_set("date.timezone", "Europe/Athens");
// ini_set('max_execution_time', 3000000);
// Kickstart the framework
$f3=require('lib/base.php');
if ((float)PCRE_VERSION<7.9)
trigger_error('PCRE version is out of date');
// Load configuration - Global Variables
$f3->config('config.ini');
// MySQL settings
try {
$f3->set('db', new DB\SQL(
'mysql:host=localhost;port=3306;dbname=winners',
'winners',
'12345678',
array(
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION
)
));
}
catch(\PDOException $e) {
// Do nothing
}
/*
$f3->set('ONERROR',function($f3){
echo \Template::instance()->render('header.tpl');
echo \Template::instance()->render('topbar.tpl');
echo \Template::instance()->render('404.tpl');
echo \Template::instance()->render('footer.tpl');
});
*/
$f3->config('routes.ini');
$f3->run();