1.C:\phpStudy\PHPTutorial\WWW\owz\application\admin\controller
创建Message.php文件
C:\phpStudy\PHPTutorial\WWW\owz\application\admin\controller\Message.php
CTRL+R 全部替换
<?php
namespace app\admin\controller;
use think\Controller;
class Message extends Controller
{
public function lst() // 加载管理员列表
{
$messageres=\think\Db::name('message')->paginate(3);
$this->assign('messageres',$messageres);
// dump($list);
return $this->fetch();
}
}
C:\phpStudy\PHPTutorial\WWW\owz\application\admin\view
创建"Message"文件夹
C:\phpStudy\PHPTutorial\WWW\owz\application\admin\view\Admin
中的lst.html文件复制到\admin\view\Admin文件下
2.C:\phpStudy\PHPTutorial\WWW\owz\application\admin\view\Message\lst.html
{volist name="list" id="vo"} 修改为:{volist name="messageres" id="vo"}
{$l