Exemplo n.º 1
0
 private function _inc_ext_file($name, $dir = '')
 {
     $ext_path = APP_PATH . $dir . '/' . Yiee::conf('class_prefix') . $name . '.php';
     if (file_exists($ext_path)) {
         require_once $ext_path;
     }
 }
Exemplo n.º 2
0
                call_user_func_array(array($obj, $uri->m_name), $uri->m_arr);
                die;
            }
        }
        show_404();
    }
    /**
     * 输出配置项(与$this->config->item()相同)
     * param	$key 输出的KEY
     * param	$index 所在的索引
     * @E-mail	rushui@qq.com
     * @author	Rushui
     */
    public static function conf($key, $index = '')
    {
        if ($index == '') {
            return isset(self::$config[$key]) ? self::$config[$key] : false;
        }
        return isset(self::$config[$index], self::$config[$index][$key]) ? self::$config[$index][$key] : false;
    }
    //运行初始化
    public static function run()
    {
        self::start();
        self::_init();
        self::_init_controller();
    }
}
//运行框架
Yiee::run();
Exemplo n.º 3
0
 public function get_suffix($name)
 {
     $view_suffix = '';
     $file_type = pathinfo($name, PATHINFO_EXTENSION);
     if (empty($file_type)) {
         $view_suffix = Yiee::conf('view_suffix') ? Yiee::conf('view_suffix') : '.php';
     }
     return $view_suffix;
 }
Exemplo n.º 4
0
 private function _add_uri_suffix($uri)
 {
     $suffix = Yiee::conf('url_suffix');
     //来自配置文件
     if (!empty($uri) && substr($uri, -1) != '/' && $suffix !== '') {
         if (($offset = strpos($uri, '?')) !== FALSE) {
             $uri = substr($uri, 0, $offset) . $suffix . substr($uri, $offset);
         } else {
             $uri .= $suffix;
         }
     }
     return $uri;
 }
Exemplo n.º 5
0
 /**
  * 输出配置项
  * param	$key 输出的KEY
  * param	$index 所在的索引
  * @E-mail	rushui@qq.com
  * @author	Rushui
  */
 public function item($key, $index = '')
 {
     return Yiee::conf($key, $index);
 }