用 $this->db->query方法取出的数据怎么渲染到实图呢
$query = $this->db->query("select * from aaa limit 0,10");//这里打印出来有数据$this->ci_smarty->assign('kc',$query->result_array());//这里开始渲染
$this->ci_smarty->assign("title", "smarty模板技术");
$this->ci_smarty->display("test/Template.html");
运行后报模板错误:Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template
我直接用smarty是没问题的,但在ci里调用会有这个错误
这里说的是 Template.html 里有语法错误吧,这是 Smarty 报的,跟 CI 无关。 嗯,原来多了一个空格
页:
[1]