Home > Backend Development > PHP Tutorial > thinkphp里volist不显示?该怎么解决

thinkphp里volist不显示?该怎么解决

WBOY
Release: 2016-06-13 11:55:20
Original
1547 people have browsed it

thinkphp里volist不显示???????
function userLIst() {
$user=M('user');
  $list=$user->field(array('uname','leixing','zhiwu','tel','email','company','website'))->select();
echo "e";
if ($list != null && $list != "") {
    $this->assign('alist',$list);
$this->success ("成功",U('Inviation/list'));
dump($list);
$this->display ();
}
===============================

  • 姓名
    {$vo.uname}
  • 类型{$vo.leixing}职务{$vo['zhiwu']}电话{$vo['tel']}邮箱{$vo['email']}
    单位名称{$vo['company']}个人博客{$vo['website']}

    ------解决方案--------------------
    首先你得先确定你的display是否对应了这个模版,先随便assign一个值进去看能不能显示出来
    如果显示不出来,那就是你模板文件的位置和名字有问题了
    目测代码没有问题,应该就是位置和display(文件名)的问题了

    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template