forked from the-benchmarker/web-frameworks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.php
More file actions
47 lines (37 loc) · 1.35 KB
/
app.php
File metadata and controls
47 lines (37 loc) · 1.35 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
<?php
/*
|--------------------------------------------------------------------------
| Load BasicPHP Functions Library and Configuration File
|--------------------------------------------------------------------------
*/
require_once 'functions.php';
require_once 'config.php';
/*
|--------------------------------------------------------------------------
| Security
|--------------------------------------------------------------------------
*/
// firewall(); // Firewall
// force_ssl(); // SSL/HTTPS
/*
|--------------------------------------------------------------------------
| Routing
|--------------------------------------------------------------------------
*/
// route_rpc(); // JSON-RPC v2.0
// route_auto(); // Automatic '/class/method' routing
// homepage(); // Render homepage
/*
|--------------------------------------------------------------------------
| Endpoint Routing
|--------------------------------------------------------------------------
*/
route_class('GET', '/', 'AppController@index');
route_class('GET', '/user/(:num)', 'AppController@viewUser');
route_class('POST', '/user', 'AppController@addUser');
/*
|--------------------------------------------------------------------------
| Handle Error 404 - Page Not Found - Invalid URI
|--------------------------------------------------------------------------
*/
// error404(); // Handle Error 404