/www/wwwroot/www.xiaoshuo688.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.xiaoshuo688.com/kuxin/response.php:332] #1 Kuxin\Response::error(Call to a member function query() on null, /www/wwwroot/www.xiaoshuo688.com/kuxin/db/mysql.php, 59) called at [/www/wwwroot/www.xiaoshuo688.com/kuxin/kuxin.php:171] #2 Kuxin\Kuxin::exception(Error Object ([ * message] => Call to a member function query() on null,[ Error string] => ,[ * code] => 0,[ * file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/db/mysql.php,[ * line] => 59,[ Error trace] => Array ([0] => Array ([function] => __construct,[class] => Kuxin\Db\Mysql,[type] => ->),[1] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/loader.php,[line] => 55,[function] => newInstanceArgs,[class] => ReflectionClass,[type] => ->),[2] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/di.php,[line] => 66,[function] => instance,[class] => Kuxin\Loader,[type] => ::),[3] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/app/plugin/configcache/configcache.php,[line] => 19,[function] => DB,[class] => Kuxin\DI,[type] => ::),[4] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/cache.php,[line] => 81,[function] => App\Plugin\ConfigCache\{closure},[class] => App\Plugin\ConfigCache\ConfigCache,[type] => ->),[5] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/app/plugin/configcache/configcache.php,[line] => 37,[function] => debugGet,[class] => Kuxin\Cache,[type] => ->),[6] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/plugin.php,[line] => 27,[function] => handle,[class] => App\Plugin\ConfigCache\ConfigCache,[type] => ->),[7] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/kuxin.php,[line] => 73,[function] => call,[class] => Kuxin\Plugin,[type] => ::),[8] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/kuxin/kuxin.php,[line] => 202,[function] => start,[class] => Kuxin\Kuxin,[type] => ::),[9] => Array ([file] => /www/wwwroot/www.xiaoshuo688.com/public/index.php,[line] => 34,[args] => Array ([0] => /www/wwwroot/www.xiaoshuo688.com/kuxin/kuxin.php),[function] => include)),[ Error previous] => ))
文件加载
/www/wwwroot/www.xiaoshuo688.com/public/index.php /www/wwwroot/www.xiaoshuo688.com/kuxin/kuxin.php /www/wwwroot/www.xiaoshuo688.com/kuxin/loader.php /www/wwwroot/www.xiaoshuo688.com/kuxin/config.php /www/wwwroot/www.xiaoshuo688.com/app/config/kuxin.php /www/wwwroot/www.xiaoshuo688.com/env.php /www/wwwroot/www.xiaoshuo688.com/kuxin/helper/arr.php /www/wwwroot/www.xiaoshuo688.com/app/config/const.php /www/wwwroot/www.xiaoshuo688.com/kuxin/registry.php /www/wwwroot/www.xiaoshuo688.com/app/helper.php /www/wwwroot/www.xiaoshuo688.com/app/version.php /www/wwwroot/www.xiaoshuo688.com/kuxin/plugin.php /www/wwwroot/www.xiaoshuo688.com/kuxin/helper/serialize.php /www/wwwroot/www.xiaoshuo688.com/app/plugin/configcache/configcache.php /www/wwwroot/www.xiaoshuo688.com/kuxin/di.php /www/wwwroot/www.xiaoshuo688.com/kuxin/cache.php /www/wwwroot/www.xiaoshuo688.com/kuxin/cache/memcached.php /www/wwwroot/www.xiaoshuo688.com/kuxin/db/mysql.php /www/wwwroot/www.xiaoshuo688.com/kuxin/response.php /www/wwwroot/www.xiaoshuo688.com/kuxin/tpl/error.php