Thinkphp volist not show?

Source: Internet
Author: User
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 ("Success", U (' inviation/list '));
Dump ($list);
$this->display ();
}
===============================

  • name
    {$vo. uname}
  • type {$vo. leixing} Job Title {$vo [' Zhiwu ']} Telephone {$VO [' tel ']} Email {$vo [' email ']}
    Unit name {$vo [' Company ']} Personal Blog {$vo [' website ']}


    Reply to discussion (solution)

    First determine if the $list has content, and then TPL inside the user folder under the template name is userlist.html

    $list have content. Must the template name be the same as the method name?

    $list have content. Must the template name be the same as the method name?

    If you want to use the other in $this->display (' your filename '), write your file name in parentheses, do not extend the name, such as abc.html you just write $this->display (' abc ');

    Not necessarily, but since you default, it must be the same.

    I volist in the HTML, there is a warning that unkown tag (volist), I was wondering whether in the HTML forgot what to draw?

    Moderator... Can you add QQ chat?

    Doesn't tp have a foreach tag? So close to the name of the label Ah, hehe is almost the same thing with foreach try another look at your array for content

    First, you have to determine whether your display corresponds to this template, first assign a value to see if it can be displayed
    If it doesn't show up, it's the location and name of your template file.
    Visual code is no problem, it should be the location and display (file name) problem

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.