-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
29 lines (23 loc) · 790 Bytes
/
Copy pathindex.php
File metadata and controls
29 lines (23 loc) · 790 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
// set our working directory to the base of index.php
chdir(__DIR__);
// Kickstart composer autoloader
require_once 'vendor/autoload.php';
$f3 = \Base::instance();
$f3->set('PACKAGE', 'PodNounce');
$f3->set('AUTOLOAD', 'app/');
$f3->set('UI', 'views/');
$f3->set('UPLOADS', 'uploads/');
$f3->config('app/routes.cfg');
$f3->config('podnounce.conf');
// establish connection to database
$pdostr = sprintf('pgsql:host=%s;port=%s;dbname=%s',
$f3->get('database.host'),
$f3->get('database.port'),
$f3->get('database.dbname')
);
$f3->set('DB', new DB\SQL($pdostr, $f3->get('database.username'), $f3->get('database.password')));
// initialize the session dbms handler
$f3->set('sess', new DB\SQL\Session($f3->get('DB')));
$f3->run();
?>