<?php ini_set("display_errors", "On"); ini_set("display_startup_errors", "On"); ini_set("html_errors", "Off"); set_error_handler("error_handler", E_ALL); $zone = @date_default_timezone_get(); date_default_timezone_set(empty($zone) ? "Asia/Tokyo" : $zone); require dirname(__FILE__) . "/Object.php"; require dirname(__FILE__) . "/Exceptions.php"; require dirname(__FILE__) . "/Rhaco.php"; register_shutdown_function("Rhaco::shutdown"); Rhaco::add(dirname(__FILE__)); Rhaco::textdomain(); function error_handler($errno, $errstr, $errfile, $errline) { if (strpos($errstr, "Use of undefined constant") !== false && preg_match("/\\'(.+?)\\'/", $errstr, $m) && class_exists($m[1])) { define($m[1], $m[1]); return true; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline); return true; } /** * extensionを読み込む * * @param string $module_name * @param string $doc */ function extension_load($module_name, $doc = null) {