thinkphp5引入db问题

浏览:14880 发布日期:2016/04/23 分类:ThinkPHP5专区 关键字: db,thinkphp,thinkphp5
<?php
namespace app\index\controller;
use think\Db;
class Index
{
public function index()
{
Db::table('users')->where('id',1)->find();

}
}


请问怎么引入Db,这样报错

[2] ErrorException in Db.php line 114

call_user_func_array() expects parameter 1 to be a valid callback, class 'think\db\driver\Mysql' does not have a method 'table'
最佳答案
评论( 相关
后面还有条评论,点击查看>>