Ejemplo n.º 1
0
/**
 * 渲染页面
 * @param  [type] $id    [description]
 * @param  [type] $array [description]
 * @return [type]        [description]
 */
function display($id, $array)
{
    $path = FISResource::getUri($id);
    if (is_file($path)) {
        extract($array);
        ob_start();
        include $path;
        $html = ob_get_clean();
        FISResource::load($id);
        //注意模板资源也要分析依赖,否则可能加载不全
        echo FISResource::renderResponse($html);
    } else {
        trigger_error($id . ' file not found!');
    }
}
Ejemplo n.º 2
0
 public static function getUri($strName, $smarty)
 {
     return FISResource::getUri($strName, $smarty);
 }