コード例 #1
0
ファイル: index.php プロジェクト: hisapi/metamodelexecutor
<?php

ini_set('display_errors', 'On');
error_reporting(E_ALL);
if (file_exists("cache/cache.classes.php")) {
    $dict = unserialize(file_get_contents("cache/cache.classes.php"));
} else {
    $dict = array();
}
include "model.database.php";
$db = new Database_Mysql();
include "config.php";
$db->connect();
include "controller.action.php";
$q = $db->query("SELECT * FROM rels;");
$APP = array();
$APP['db'] = $db;
// 2-line front controller
$BASE_PATH = str_replace("index.php", "", $_SERVER['SCRIPT_NAME']);
$RESOURCE_REQUEST = substr($_SERVER['REQUEST_URI'], strlen($BASE_PATH), strlen($_SERVER['REQUEST_URI']) - strlen($BASE_PATH));
if ($RESOURCE_REQUEST == "?") {
    $RESOURCE_REQUEST = "";
}
if (strstr($RESOURCE_REQUEST, "?") !== false) {
    $RESOURCE_REQUEST = explode("?", $RESOURCE_REQUEST);
    $RESOURCE_REQUEST = $RESOURCE_REQUEST[0];
}
$reserved = array();
include "reserved_words.php.php";
include "reserved_words.net.php";
include "functions.php";