Last change
on this file since 20293 was
20293,
checked in by mistic100, 11 years ago
|
first commit of oAuth plugin, still in developpement
|
File size:
815 bytes
|
Line | |
---|
1 | <?php |
---|
2 | // this is a 2k micro mvc 'thing'.., what you looking for in inside ./application directory |
---|
3 | // based on http://www.henriquebarroso.com/how-to-create-a-simple-mvc-framework-in-php/ |
---|
4 | error_reporting( E_ALL ); |
---|
5 | ini_set( "display_errors", 1 ); |
---|
6 | |
---|
7 | session_start(); |
---|
8 | |
---|
9 | $uri = array(); |
---|
10 | |
---|
11 | if( isset( $_GET['route'] ) ){ |
---|
12 | $array_tmp_uri = preg_split('[\\/]', $_GET['route'], -1, PREG_SPLIT_NO_EMPTY); |
---|
13 | $uri['controller'] = @ $array_tmp_uri[0]; |
---|
14 | $uri['method'] = @ $array_tmp_uri[1]; |
---|
15 | $uri['var'] = @ $array_tmp_uri[2]; |
---|
16 | } |
---|
17 | else{ |
---|
18 | $uri['controller'] = "home"; |
---|
19 | $uri['method'] = "index"; |
---|
20 | $uri['var'] = ""; |
---|
21 | } |
---|
22 | |
---|
23 | //Load config and base |
---|
24 | require_once("application.config.php"); |
---|
25 | require_once("application/base.php"); |
---|
26 | |
---|
27 | //loads controller |
---|
28 | $application = new application( $uri ); |
---|
29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.