Warning: include(/www/wwwroot/www.aiziru.com/env.php): failed to open stream: No such file or directory in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 2

Warning: include(): Failed opening '/www/wwwroot/www.aiziru.com/env.php' for inclusion (include_path='.:/www/server/php/73/lib/php') in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 2

Warning: Use of undefined constant APP_ENV - assumed 'APP_ENV' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 5

Warning: Use of undefined constant APP_ENV - assumed 'APP_ENV' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 7

Warning: Use of undefined constant API_BASE_URL - assumed 'API_BASE_URL' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 63

Warning: Use of undefined constant KX_DB_HOST - assumed 'KX_DB_HOST' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 73

Warning: Use of undefined constant KX_DB_PORT - assumed 'KX_DB_PORT' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 74

Warning: Use of undefined constant KX_DB_USER - assumed 'KX_DB_USER' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 75

Warning: Use of undefined constant KX_DB_PWD - assumed 'KX_DB_PWD' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 76

Warning: Use of undefined constant KX_DB_NAME - assumed 'KX_DB_NAME' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 77

Warning: Use of undefined constant KX_CACHE_COMMON_DRIVER - assumed 'KX_CACHE_COMMON_DRIVER' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.aiziru.com/app/config/kuxin.php on line 132
KXcms Framework - 系统发生错误
Hi,出错了!

Call to a member function query() on null

错误位置

/www/wwwroot/www.aiziru.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.aiziru.com/kuxin/response.php:330]
#1  Kuxin\Response::error(Call to a member function query() on null, /www/wwwroot/www.aiziru.com/kuxin/db/mysql.php, 59) called at [/www/wwwroot/www.aiziru.com/kuxin/kuxin.php:162]
#2  Kuxin\Kuxin::exception(Error Object ([*message] => Call to a member function query() on null,[Errorstring] => ,[*code] => 0,[*file] => /www/wwwroot/www.aiziru.com/kuxin/db/mysql.php,[*line] => 59,[Errortrace] => Array ([0] => Array ([function] => __construct,[class] => Kuxin\Db\Mysql,[type] => ->,[args] => Array ([0] => Array ([host] => KX_DB_HOST,[port] => KX_DB_PORT,[user] => KX_DB_USER,[pwd] => KX_DB_PWD,[name] => KX_DB_NAME,[charset] => utf8))),[1] => Array ([file] => /www/wwwroot/www.aiziru.com/kuxin/loader.php,[line] => 55,[function] => newInstanceArgs,[class] => ReflectionClass,[type] => ->,[args] => Array ([0] => Array ([0] => Array ([host] => KX_DB_HOST,[port] => KX_DB_PORT,[user] => KX_DB_USER,[pwd] => KX_DB_PWD,[name] => KX_DB_NAME)))),[2] => Array ([file] => /www/wwwroot/www.aiziru.com/kuxin/di.php,[line] => 66,[function] => instance,[class] => Kuxin\Loader,[type] => ::,[args] => Array ([0] => \Kuxin\Db\mysql,[1] => Array ([0] => Array ([host] => KX_DB_HOST,[port] => KX_DB_PORT,[user] => KX_DB_USER,[pwd] => KX_DB_PWD,[name] => KX_DB_NAME)))),[3] => Array ([file] => /www/wwwroot/www.aiziru.com/app/plugin/configcache/configcache.php,[line] => 19,[function] => DB,[class] => Kuxin\DI,[type] => ::,[args] => Array ()),[4] => Array ([file] => /www/wwwroot/www.aiziru.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.aiziru.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.aiziru.com/kuxin/plugin.php,[line] => 27,[function] => handle,[class] => App\Plugin\ConfigCache\ConfigCache,[type] => ->,[args] => Array ([0] => )),[7] => Array ([file] => /www/wwwroot/www.aiziru.com/kuxin/kuxin.php,[line] => 72,[function] => call,[class] => Kuxin\Plugin,[type] => ::,[args] => Array ([0] => app_start)),[8] => Array ([file] => /www/wwwroot/www.aiziru.com/kuxin/kuxin.php,[line] => 193,[function] => start,[class] => Kuxin\Kuxin,[type] => ::,[args] => Array ()),[9] => Array ([file] => /www/wwwroot/www.aiziru.com/public/index.php,[line] => 5,[args] => Array ([0] => /www/wwwroot/www.aiziru.com/kuxin/kuxin.php),[function] => include)),[Errorprevious] => ))
文件加载
/www/wwwroot/www.aiziru.com/public/index.php
/www/wwwroot/www.aiziru.com/kuxin/kuxin.php
/www/wwwroot/www.aiziru.com/kuxin/loader.php
/www/wwwroot/www.aiziru.com/kuxin/config.php
/www/wwwroot/www.aiziru.com/app/config/const.php
/www/wwwroot/www.aiziru.com/app/config/kuxin.php
/www/wwwroot/www.aiziru.com/kuxin/helper/arr.php
/www/wwwroot/www.aiziru.com/kuxin/registry.php
/www/wwwroot/www.aiziru.com/app/helper.php
/www/wwwroot/www.aiziru.com/app/version.php
/www/wwwroot/www.aiziru.com/kuxin/plugin.php
/www/wwwroot/www.aiziru.com/kuxin/helper/serialize.php
/www/wwwroot/www.aiziru.com/app/plugin/configcache/configcache.php
/www/wwwroot/www.aiziru.com/kuxin/di.php
/www/wwwroot/www.aiziru.com/kuxin/cache.php
/www/wwwroot/www.aiziru.com/kuxin/db/mysql.php
/www/wwwroot/www.aiziru.com/kuxin/response.php
/www/wwwroot/www.aiziru.com/kuxin/tpl/error.php