miniMVC/index.php

22 lines
562 B
PHP
Raw Normal View History

2011-12-27 13:24:28 -05:00
<?php
// Change this in a live environment!
error_reporting(-1);
// Set the default paths
define('SYS_PATH', __DIR__.'/sys/');
define('MOD_PATH', __DIR__.'/modules/');
define('APP_PATH', __DIR__.'/app/');
2011-12-29 16:57:28 -05:00
$ri = $_SERVER['REQUEST_URI'];
$ind_pos = stripos($ri, "index.php/");
$default_path = ($ind_pos !== FALSE) ? substr($ri, 0, $ind_pos) : $ri;
$default_baseurl = "//".$_SERVER['HTTP_HOST']. $default_path;
// Require the basic configuratio file
require(APP_PATH.'config/config.php');
2011-12-27 13:24:28 -05:00
// Require the most important files
require(SYS_PATH . "common.php");
2011-12-27 13:24:28 -05:00