示例#1
0
文件: index.php 项目: kurari/XSystem
<?php

require_once '../../lib/base/util.class.php';
XUtil::addIncludePath(XUtil::makePath("../..", 'class'), XUtil::makePath("../..", 'lib'));
require_once 'XSystem.class.php';
$file = "../etc/site.ini";
define("SITE_ROOT", realpath("../"));
$Mes = new XMessage();
$Mes->set('type', 'display');
$Mes->set('app', 'bbs');
$Mes->set('function', 'run');
$Mes->set('data', array());
$FW = XSystem::factory($file, array('site.root' => SITE_ROOT));
$FW->accept($Mes);
示例#2
0
<?php

define('XROOT', realpath(dirname(__FILE__) . '/../'));
require_once XROOT . '/lib/base/util.class.php';
XUtil::addIncludePath(XUtil::makePath(XROOT, 'class'), XUtil::makePath(XROOT, 'lib'));
spl_autoload_register(array('XUtil', 'autoLoad'));
// Error to Exception
function exception_error_handler($errno, $errstr, $errfile, $errline)
{
    throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler("exception_error_handler");