-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·79 lines (54 loc) · 1.58 KB
/
index.php
File metadata and controls
executable file
·79 lines (54 loc) · 1.58 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* Phmisk: Php Html MIcro Starter Kit
*
* Phmisk is a starter kit to make a php/html site, it comes with an html5 UI, a router, a template engine, an ORM database layer.
*
* @package Phmisk
* @author Alessandro Massasso <alo@eventualo.net>
* @license GPL
* @link https://github.com/groucho75/phmisk
*/
/** -----------------------------------------------------------------
* Setup section
* ------------------------------------------------------------------ */
/**
* Set the environment: 'dev', 'test', 'live'
*/
define('ENV', 'dev');
/**
* Set the path to 'app' folder, without slashes. Default: 'app'
* For security you can move it above web root, e.g.: '../app'
*/
define('APP_PATH', 'app');
/**
* Set the path to 'ui' folder, without slashes. Default: 'ui'
*/
define('UI_PATH', 'ui');
/** -----------------------------------------------------------------
* Load & init Phmisk
* ------------------------------------------------------------------ */
/**
* If 'vendor' folder does not exist, stop and alert
*/
if ( ! is_dir(APP_PATH . '/vendor') )
{
die('<h1>Ehi!</h1><strong>You have to launch <a href="https://getcomposer.org/doc/00-intro.md#installation-nix" target="_blank">Composer installation</a> to make Phmisk ready to work!</strong>');
}
/**
* Composer autoload
*/
require __DIR__ .'/'. APP_PATH . '/vendor/autoload.php';
/**
* Init the application
*/
require __DIR__ .'/'. APP_PATH . '/bootstrap.php';
/**
* Load the routes
*/
require __DIR__ .'/'. APP_PATH . '/routes.php';
/**
* ...let's go!
*/
$ph4->router->run();
/* EOF */