THINKPHP 5.0RC2 volist问题

浏览:1066 发布日期:2016/03/11 分类:求助交流
刚刚下载5.0版,发现VOLIST标签有点问题,为什么像以前的<volist> 无法使用了,必须要像这样才可以{volist}

Index.php内容:
<?php
namespace app\index\controller;

class Index
{
public function index()
{
header("Content-type:Text/html;charset=utf-8");
$options = [
'type' => 'File', // 缓存类型为File
'expire' => 10 // 0为缓存有效期为永久有效
];
S($options);
$news = S('news');
if(!$news){
$list = M("news")->order("id DESC")->select();
S('news',$list);
$news = $list;
}
$view = new \think\View();
$view->assign('list',$news);
return $view->fetch();
}
}


模板中是这样的:

{volist name="list" id="vo"}
{$vo.id} -- {$vo.title} -- {$vo.content} -- {$vo.time|date="Y-m-d H:i:s",###}<br />
{/volist}

附件 volsit.png ( 70.45 KB 下载:13 次 )

最佳答案
评论( 相关
后面还有条评论,点击查看>>