为什么输出变量在不进行编译?

浏览:401 发布日期:2013/05/22 分类:求助交流 关键字: 模板输出
配置:return array(
//'配置项'=>'配置值'
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => 'localhost', // 服务器地址
'DB_NAME' => 'newstable', // 数据库名
'DB_USER' => 'root', // 用户名
'DB_PWD' => '52573751', // 密码
'DB_PORT' => '', // 端口
'DB_PREFIX' => 'cn_', // 数据库表前缀
'DB_FIELDTYPE_CHECK' => false, // 是否进行字段类型检查
'DB_FIELDS_CACHE' => true, // 启用字段缓存
'DB_CHARSET' => 'utf8', // 数据库编码默认采用utf8
'TMPL_ENGINE_TYPE' => 'PHP',
'HTML_CACHE_ON' => false,
'URL_MODEL' => 2,
'URL_CASE_INSENSITIVE' => true,

);
action:
class IndexAction extends Action {
public function index(){
//$this->show('hello world','utf-8');
$news=$this->m();
//$news=M($news);
$list=$news->order('time desc')->limit(5)->select();

$this->assign('list',$list);
//print_r($list);
$this->display('./home/Tpl/Index/index.tpl');


}
但模板输出:<volist name="list" id="list"><li>{$list['style']}{$list['title']}</li></volist>
页面输出结果是:{$list['style']}{$list['title']},这是为什么啊?
最佳答案
评论( 相关
后面还有条评论,点击查看>>