Hi,出错了!

Call to a member function query() on null

错误位置

/www/wwwroot/www.92zhao.com/kuxin/db/mysql.php  LINE: 59

49      */
50     public function __construct(array $params)
51     {
52         //连接数据库
53         $params['charset'] = empty($params['charset']) ? 'utf8' : $params['charset'];
54         try {
55             $this->db_link = new \PDO("mysql:host={$params['host']};port={$params['port']};dbname={$params['name']}", $params['user'], $params['pwd'], []);
56         } catch (\Exception $e) {
57             trigger_error($e->getMessage());
58         }
59         $this->db_link->query("SET NAMES {$params['charset']}");
60         $this->db_link->query("SET sql_mode='NO_ENGINE_SUBSTITUTION'");
61         if (!$this->db_link) {
62             trigger_error($params['driver'] . ' Server connect fail! <br/>Error Message:' . $this->db_link->error() . '<br/>Error Code:' . $this->db_link->errno(), E_USER_ERROR);
63         }
64         $this->debug = Config::get('database.debug', Config::get('app.debug', false));
65     }
66 
67     /**
68      * 执行SQL语句
69      * SQL语句执行函数
TRACE
#0  include() called at [/www/wwwroot/www.92zhao.com/kuxin/response.php:331]
#1  Kuxin\Response::error(Call to a member function query() on null, /www/wwwroot/www.92zhao.com/kuxin/db/mysql.php, 59) called at [/www/wwwroot/www.92zhao.com/kuxin/kuxin.php:166]
#2  Kuxin\Kuxin::exception(Error Object ([*message] => Call to a member function query() on null,[Errorstring] => ,[*code] => 0,[*file] => /www/wwwroot/www.92zhao.com/kuxin/db/mysql.php,[*line] => 59,[Errortrace] => Array ([0] => Array ([function] => __construct,[class] => Kuxin\Db\Mysql,[type] => ->,[args] => Array ([0] => Array ([host] => localhost,[port] => 3306,[user] => www_92zhaov5_com,[pwd] => Zk4t7Hh33HPdWc7Z,[name] => www_92zhaov5_com,[charset] => utf8))),[1] => Array ([file] => /www/wwwroot/www.92zhao.com/kuxin/loader.php,[line] => 55,[function] => newInstanceArgs,[class] => ReflectionClass,[type] => ->,[args] => Array ([0] => Array ([0] => Array ([host] => localhost,[port] => 3306,[user] => www_92zhaov5_com,[pwd] => Zk4t7Hh33HPdWc7Z,[name] => www_92zhaov5_com)))),[2] => Array ([file] => /www/wwwroot/www.92zhao.com/kuxin/di.php,[line] => 66,[function] => instance,[class] => Kuxin\Loader,[type] => ::,[args] => Array ([0] => \Kuxin\Db\mysql,[1] => Array ([0] => Array ([host] => localhost,[port] => 3306,[user] => www_92zhaov5_com,[pwd] => Zk4t7Hh33HPdWc7Z,[name] => www_92zhaov5_com)))),[3] => Array ([file] => /www/wwwroot/www.92zhao.com/app/plugin/configcache/configcache.php,[line] => 19,[function] => DB,[class] => Kuxin\DI,[type] => ::,[args] => Array ()),[4] => Array ([file] => /www/wwwroot/www.92zhao.com/kuxin/cache.php,[line] => 81,[function] => App\Plugin\ConfigCache\{closure},[class] => App\Plugin\ConfigCache\ConfigCache,[type] => ->,[args] => Array ([0] => app.config)),[5] => Array ([file] => /www/wwwroot/www.92zhao.com/app/plugin/configcache/configcache.php,[line] => 6,[function] => debugGet,[class] => Kuxin\Cache,[type] => ->,[args] => Array ([0] => app.config,[1] => Closure Object ())),[6] => Array ([file] => /www/wwwroot/www.92zhao.com/kuxin/plugin.php,[line] => 27,[function] => handle,[class] => App\Plugin\ConfigCache\ConfigCache,[type] => ->,[args] => Array ([0] => )),[7] => Array ([file] => /www/wwwroot/www.92zhao.com/kuxin/kuxin.php,[line] => 73,[function] => call,[class] => Kuxin\Plugin,[type] => ::,[args] => Array ([0] => app_start)),[8] => Array ([file] => /www/wwwroot/www.92zhao.com/kuxin/kuxin.php,[line] => 215,[function] => start,[class] => Kuxin\Kuxin,[type] => ::,[args] => Array ()),[9] => Array ([file] => /www/wwwroot/www.92zhao.com/public/index.php,[line] => 5,[args] => Array ([0] => /www/wwwroot/www.92zhao.com/kuxin/kuxin.php),[function] => include)),[Errorprevious] => ))
文件加载
/www/wwwroot/www.92zhao.com/public/index.php
/www/wwwroot/www.92zhao.com/kuxin/kuxin.php
/www/wwwroot/www.92zhao.com/kuxin/loader.php
/www/wwwroot/www.92zhao.com/kuxin/config.php
/www/wwwroot/www.92zhao.com/app/config/const.php
/www/wwwroot/www.92zhao.com/app/config/kuxin.php
/www/wwwroot/www.92zhao.com/env.php
/www/wwwroot/www.92zhao.com/kuxin/helper/arr.php
/www/wwwroot/www.92zhao.com/kuxin/registry.php
/www/wwwroot/www.92zhao.com/app/helper.php
/www/wwwroot/www.92zhao.com/app/version.php
/www/wwwroot/www.92zhao.com/kuxin/plugin.php
/www/wwwroot/www.92zhao.com/kuxin/helper/serialize.php
/www/wwwroot/www.92zhao.com/app/plugin/configcache/configcache.php
/www/wwwroot/www.92zhao.com/kuxin/di.php
/www/wwwroot/www.92zhao.com/kuxin/cache.php
/www/wwwroot/www.92zhao.com/kuxin/cache/memcached.php
/www/wwwroot/www.92zhao.com/kuxin/db/mysql.php
/www/wwwroot/www.92zhao.com/kuxin/response.php
/www/wwwroot/www.92zhao.com/kuxin/tpl/error.php