3.2.0Beta 独立风格的改进建议

浏览:395 发布日期:2013/07/01 分类:求助交流 关键字: themes 主题 风格
这是开发版的代码:// 分析模板文件规则
        if('' == $template) {
            // 如果模板文件名为空 按照默认规则定位
            $template = CONTROLLER_NAME . C('TMPL_FILE_DEPR') . ACTION_NAME;
        }elseif(false === strpos($template, '/')){
            $template = CONTROLLER_NAME . C('TMPL_FILE_DEPR') . $template;
        }
改进如下if('' == $template) {
            // 如果模板文件名为空 按照默认规则定位
           if(C('VIEW_PATH')){
            $template = THEME_PATH . '/'. ACTION_NAME;
}else{
$template = CONTROLLER_NAME . C('TMPL_FILE_DEPR') . ACTION_NAME;
}
        }elseif(false === strpos($template, '/')){
            $template = CONTROLLER_NAME . C('TMPL_FILE_DEPR') . $template;
        }
最佳答案
评论( 相关
后面还有条评论,点击查看>>