예제 #1
0
파일: index.php 프로젝트: rperello/Anidcore
 * When using a legacy application with PHP >= 5.3, it is recommended to disable
 * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED
 */
error_reporting(E_ALL | E_STRICT);
/**
 * Display errors by default 
 */
ini_set("display_errors", true);
/**
 * Set default charset, locale and timezone 
 */
ini_set('default_charset', 'UTF-8');
setlocale(LC_ALL, 'en_US.UTF8');
date_default_timezone_set('UTC');
//Check PHP 5.3
if (version_compare(PHP_VERSION, "5.3", "<")) {
    throw new RuntimeException("Anidcore Framework needs PHP 5.3 or greater in order to run");
}
// Change dir to root dir
chdir(AC_PATH);
// Include AC_PATH in include path
restore_include_path();
set_include_path(get_include_path() . PATH_SEPARATOR . AC_PATH);
// Load the core
require_once AC_PATH_SYSTEM . "functions.php";
require_once AC_PATH_SYSTEM . "classes" . _DS . "ac" . _DS . "loader.php";
if (is_readable(AC_PATH_APP . "install.php")) {
    require_once AC_PATH_APP . "install.php";
} else {
    Ac::run(true);
}