文章详情页
继承Controller类之后报错
浏览:67日期:2022-06-01 16:22:20
问题描述
<?php
namespace appadminscontroller;
use thinkController;
use UtildataSysdb;
class Test extends Controller
{
public function index(){
$this->db = new Sysdb;
$res = $this->db->table('admins')->field('id,username')->lists();
dump($res);
}
}
会显示该网页无法运作,去掉extends Controller就不会报这个错
问题解答
回答1:你是tp6还是5,tp6继承BaseController
回答2:报的这个错,而且我已经把调试模式打开了
会报什么错?截图来看看啊
相关文章:
排行榜
