1.D:\phpStudy\WWW\lianxi\application\admin\controller
复制admin\controller下的Index.php文件内容,修改名字为Admin.php
修改内容:
<?php
namespace app\admin\controller; // app对应application、admin对应模块名称、controller对应控制器的文件夹
use think\Controller; // 引用think下面的Controller
class Admin extends Controller
{
public function lst() // 加载管理员列表页
{
return $this->fetch();
}
public function add() // 添加管理员信息
{
return $this->fetch();
}
}
2.D:\phpStudy\WWW\lianxi\application\admin\view
下创建admin文件夹,把“后台”的list.htm和add.htm文件
复制到admin文件夹下,把list.htm名字修改为lst.php
(有样式的后台列表页面)
http://www.iheyu.com/lianxi/public/index.php/admin/admin/lst
3.修改admin\view\admin\lst.htm 下的路径
修改内容:1、修改样式路径
<!--Basic Styles-->
<link href="__PUBLIC__/style/bootstrap.css" rel="stylesheet">
<link href="__PUBLIC__/style/font-awesome.css" rel="stylesheet">
<link href="__PUBLIC__/style/weather-icons.css" rel="stylesheet">
<!--Beyond styles-->
<link id="beyond-link" href="__PUBLIC__/style/beyond.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/style/demo.css" rel="stylesheet">
<link href="__PUBLIC__/style/typicons.css" rel="stylesheet">
<link href="__PUBLIC__/style/animate.css" rel="stylesheet">
</head>
2、修改图片路径
<small>
<img src="__PUBLIC__/images/logo.png" alt="">
</small>
<div class="avatar" title="View your public profile">
<img src="__PUBLIC__/images/adam-jansen.jpg">
</div>
3、修改js路径
<!--Basic Scripts-->
<script src="__PUBLIC__/style/jquery_002.js"></script>
<script src="__PUBLIC__/style/bootstrap.js"></script>
<script src=