Home  >  Q&A  >  body text

Class 'Util\data\Sysdb' not found Something went wrong Something went wrong

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()


布拉德皮特·老王布拉德皮特·老王1973 days ago977

reply all(1)I'll reply

  • 王毛毛

    王毛毛2020-12-02 16:07:37

    I also have a problem here. Do you know what happened now?

    reply
    0
  • Cancelreply