-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
36 lines (27 loc) · 767 Bytes
/
index.php
File metadata and controls
36 lines (27 loc) · 767 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
30
31
32
33
34
35
36
<?php
/*******************************
* Potlu Framework 1.0
* Antony Tanuputra - 2017
*
******************************/
session_start();
define('APP_PATH', dirname(__FILE__) . '\\app\\');
/* setup application */
require 'framework/application.php';
/* setup dependency */
loadLibrary();
loadHelper();
loadStarter();
loadMenu();
/* retrive configuration */
$appConfig = include APP_PATH . '\\config\\app.php';
// setup base_url
Flight::set("flight.base_url", $appConfig['baseurl']);
// setup database
ORM::configure($appConfig['dsn']);
ORM::configure('username', $appConfig['username']);
ORM::configure('password', $appConfig['password']);
/* setup route */
require APP_PATH . '\\routes.php';
/* start */
Flight::start();