-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
42 lines (31 loc) · 773 Bytes
/
index.php
File metadata and controls
42 lines (31 loc) · 773 Bytes
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
<?php
/*
* SET ERROR REPORTING:
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
/*
* SET AUTOLOADING:
*/
//require 'Autoload.php';
function __autoload($class) {
if($class=='Controller') {
require_once "Controller.php";
}elseif($class=='View') {
require_once "View.php";
}elseif($class=='Model') {
require_once "Model.php";
}elseif(stristr($class,'M_')) {
require_once "models/".$class.".php";
}else {
require_once "controllers/".$class.".php";
}
}
include_once 'bootstrap.php';
$page = 'index';
if(isset($_GET['page'])) {
$page = $_GET['page'];
}
$controller = ucfirst($page);
new $controller;
//$result = $mysqli->query("SELECT value FROM catalog_product_entity_varchar LIMIT 5");