The code is correct. The capitalization is also correct, but there is an error when calling db. Is there something wrong with my configuration?
[1] ErrorException in Test.php line 12
Class 'Util\data\Sysdb' not found
use think\Controller;use Util\data\Sysdb;/***
*/class Test extends Controller{ public function index(){ $this->db = new Sysdb; $res = $this->db->table('admins')->where(array('id'=>1))->item(); dump($res); }}
Call Stack
in Test.php line 12at Error::appShutdown()
I also have a problem here. Do you know what happened now?