<?php
error_reporting(E_ALL); //E_ALL
function cache_shutdown_error() {
    $error = '';
    $_error = error_get_last();

    if ($_error && in_array($_error['type'], array(1, 4, 16, 64, 256, 4096, E_ALL))) {

        $error .= '<font color=red>你的代码出错了：</font></br>';
        $error .= '致命错误:' . $_error['message'] . '</br>';
        $error .= '文件:' . $_error['file'] . '</br>';
        $error .= '在第' . $_error['line'] . '行</br>';
        file_put_contents(DIR_LOGS."500error.txt","\n".date('Y-m-d H:i:s',time()).":\n".$error,FILE_APPEND);
    }
}

register_shutdown_function("cache_shutdown_error");
// Version
define('VERSION', '3.0.3.2');

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	header('Location: install/index.php');
	exit;
}

// Startup
require_once(DIR_SYSTEM . 'startup.php');

start('catalog');