/+junk/StupidMVC

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/StupidMVC

« back to all changes in this revision

Viewing changes to index.php

  • Committer: Gustav Hartvigsson
  • Date: 2016-03-15 21:09:11 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20160315210911-3jgqymrctds0lj8n
* initial code

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * StupidMVC, The stupidly designed 
 
5
 */
 
6
 
 
7
 
 
8
/**
 
9
 * Set to FALSE to turn off errors.
 
10
 */
 
11
define ("DISPLAY_ERROR", TRUE);
 
12
if (DISPLAY_ERROR) {
 
13
  ini_set ('display_startup_errors',1);
 
14
  ini_set ('display_errors',1);
 
15
  error_reporting(-1);
 
16
}
 
17
 
 
18
/* ***************************************************************************
 
19
 * Do not touch anything bellow this point.
 
20
 * ************************************************************************** */
 
21
 
 
22
global $_stupid_cfg;
 
23
 
 
24
$_stupid_cfg = json_decode (file_get_contents ("./cfg.json"));
 
25
 
 
26
/**
 
27
 * The system wide definitions.
 
28
 */
 
29
define ("DS", DIRECTORY_SEPARATOR);
 
30
define ("ROOT_DIR", dirname(__FILE__) . DS);
 
31
define ("COMMON_DIR", ROOT_DIR . "Common" . DS);
 
32
define ("APP_DIR", ROOT_DIR . "Application" . DS);
 
33
 
 
34
foreach (glob(COMMON_DIR . "*.php") as $php_file) {
 
35
  require ($php_file);
 
36
}
 
37
 
 
38
/* *****************************************************************************
 
39
 *
 
40
 * ************************************************************************** */
 
41
 
 
42
 
 
43
_rout ();
 
44