复制代码 代码如下: public function mylist(){ $user = new Model(‘User'); $list = $user->getField(‘id,username'); $this->assign(‘users',$list); $this->display(); }
2、在模板页面中导入标签库并写如下代码即可
复制代码 代码如下:
这样我们只用了一个简单的标签就实现了下面的功能:(编译后的HTML代码)
复制代码 代码如下:
Statement:
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