public static function init() { self::$config = iPHP::config(); iURL::init(self::$config['router']); define('iCMS_DIR', self::$config['router']['DIR']); define('iCMS_URL', self::$config['router']['URL']); define('iCMS_PUBLIC_URL', self::$config['router']['public_url']); define('iCMS_FS_URL', self::$config['FS']['url']); define('iCMS_REWRITE', iPHP_ROUTER_REWRITE); define('iCMS_API', iCMS_PUBLIC_URL . '/api.php'); define('iCMS_UI', iCMS_DIR . 'app/ui/common'); define('iCMS_UI_URL', iCMS_URL . '/app/ui/common'); define('iCMS_API_URL', iCMS_API . '?app='); self::assign_site(); }