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