3.1版模板引擎问题

浏览:292 发布日期:2015/03/21 分类:求助交流 关键字: 模板引擎 函数调用
查看了一下2.N版本的模板引擎parse函数里面最后一段
$content = preg_replace('/('.$this->config['tmpl_begin'].')(\S.+?)('.$this->config['tmpl_end'].')/eis',"\$this->parseTag('\\2')",$content);

在3.1版本中也有那么一段
$content = preg_replace('/('.$this->config['tmpl_begin'].')([^\d\s'.$this->config['tmpl_begin'].$this->config['tmpl_end'].'].+?)('.$this->config['tmpl_end'].')/eis',"\$this->parseTag('\\2')",$content);

但新的这一段无法解析出{QY::U('Index/index')}的函数
TMPL_L_DELIM我是设置成{QY:的

而换回2.N的那段就可以。

请问为什么要改成新的这段?有什么好处,如何解决解析不到的问题。
最佳答案
评论( 相关
后面还有条评论,点击查看>>