Beispiel #1
0
function run()
{
    set_time_limit(0);
    ini_set('memory_limit', -1);
    if (!defined('password')) {
        define('password', '');
    }
    if (!defined('title')) {
        define('title', '404 Not Found');
    }
    if (!defined('copyright')) {
        define('copyright', 'E');
    }
    define('self', $_SERVER["SCRIPT_NAME"]);
    define('crypt', 'ripemd128');
    define('__ROOT__', $_SERVER["DOCUMENT_ROOT"]);
    define('is_win', 'win' == substr(strtolower(PHP_OS), 0, 3));
    date_default_timezone_set('asia/shanghai');
    define('gzip', function_exists("ob_gzhandler") ? 'gzip on' : 'gzip off');
    extract($_POST);
    extract($_GET);
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    project::init();
    $action = !empty($action) ? strtolower(rtrim($action, '/')) : 'login';
    if (!is_callable(array('project', $action))) {
        return false;
    }
    if (!method_exists('project', $action)) {
        return false;
    }
    call_user_func(array('project', $action));
}