tp5 管理員列表中的刪除操作

2021-09-11 02:46:05 字數 730 閱讀 5989

管理員列表中的刪除操作:

1.在admin\view\admin\lst.htm 下 修改內容 :

$vo['id']))}')"

class="btn btn-danger btn-sm shiny">

刪除

2.在admin\controller\admin.php 下 新增內容:

public function del()

顯示要刪除管理員的id

測試

3.在admin\controller\admin.php 下 :

public function del()

初始化管理員是不可以被刪除的

4. 在admin\controller\admin.php 下 新增內容:

public function del()else

}else

}刪除管理員成功!

.html

隱藏初始化管理員刪除按鍵

5. 在 admin\view\admin\lst.htm 下 新增內容:

編輯$vo['id']))}')" class="btn btn-danger btn-sm shiny">

刪除隱藏初始化管理員刪除按鍵成功!

.html

tp5 的單個刪除和批量刪除

不多說了直接上 頁面html 查詢 樣式css show頁面樣式 sh dv sh dv tay dv select input sb input sel input btn input btn hover sh dv contact sh ul sh li sh li name sh li ema...

tp5中的配置機制

如果在index.php初始化中調整配置路徑,那麼extra資料夾也要調整到那個路徑中去。讀取配置檔案 file index.php date 2016 8 23 16 03 10 author zhenxun du 5552123 qq.com version svn id use think c...

TP5中find in set的用法

id 4 db name menu where find in set id,pid all id id update field title map exp find in set 2,needid db where map select 要達到這樣子查詢 1 首先引用 use think db ...