示例#1
0
require 'config/loader.php';
// Load the config parameters
require 'config/config.php';
// Load the routes
require 'config/router.php';
// Register shortcut functions
function e($string)
{
    echo htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
}
function d()
{
    return call_user_func_array('Debugger::debug', func_get_args());
}
// Start the firewall
Firewall::start();
// Start the session
Session::start();
// Analyze the PHP code
if (Debugger::$enabled) {
    Analyzer::execute();
}
// Load the action into body
ob_start();
if (Router::getTemplateAction()) {
    require Router::getTemplateAction();
}
if (ob_get_contents()) {
    ob_end_flush();
    trigger_error('MindaPHP template action"' . Router::getTemplateAction() . '" should not send output. Error raised ', E_USER_WARNING);
} else {