1、在控制器文件中(/app/exam/contorller/discuss.app.php)加入代码
$this->tpl->assign('users',$this->user->getUsersByArgs());
2、模板文件中(/app/exam/tpls/app/discuss.tpl)加入代码
{x2;$users[v:question['discuss_userid']]['username']}
- 上一篇:文章模块 文章中加入阅读量信息
- 下一篇:增加站内短信
- 文章导航
1、在控制器文件中(/app/exam/contorller/discuss.app.php)加入代码
$this->tpl->assign('users',$this->user->getUsersByArgs());
2、模板文件中(/app/exam/tpls/app/discuss.tpl)加入代码
{x2;$users[v:question['discuss_userid']]['username']}