抓取结果
Whoops! There was an error. Exception (500) connect database error :Too many connections Exception thrown with message "connect database error :Too many connections" Stacktrace: #15 Exception in /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php:187 #14 framework\base\db\MysqlDriver:_connect in /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php:214 #13 framework\base\db\MysqlDriver:_getWriteLink in /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php:44 #12 framework\base\db\MysqlDriver:execute in /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php:67 #11 framework\base\db\MysqlDriver:insert in /www/wwwroot/sdguozhijingyiyuancom/framework/base/Model.php:82 #10 framework\base\Model:insert in /www/wwwroot/sdguozhijingyiyuancom/app/base/model/BaseModel.php:276 #9 app\base\model\BaseModel:add in /www/wwwroot/sdguozhijingyiyuancom/app/duxcms/model/TotalVisitorModel.php:42 #8 app\duxcms\model\TotalVisitorModel:addData in /www/wwwroot/sdguozhijingyiyuancom/app/home/controller/SiteController.php:18 #7 app\home\controller\SiteController:__construct in /www/wwwroot/sdguozhijingyiyuancom/app/base/controller/ErrorController.php:16 #6 app\base\controller\ErrorController:error in /www/wwwroot/sdguozhijingyiyuancom/app/base/hook/AppHook.php:19 #5 app\base\hook\AppHook:appError in /www/wwwroot/sdguozhijingyiyuancom/framework/base/Hook.php:38 #4 call_user_func_array in /www/wwwroot/sdguozhijingyiyuancom/framework/base/Hook.php:38 #3 framework\base\Hook:exec in /www/wwwroot/sdguozhijingyiyuancom/framework/base/Hook.php:25 #2 framework\base\Hook:listen in /www/wwwroot/sdguozhijingyiyuancom/framework/base/App.php:81 #1 framework\base\App:run in /www/wwwroot/sdguozhijingyiyuancom/framework/core.php:109 #0 require in /www/wwwroot/sdguozhijingyiyuancom/index.php:8 COPY HIDE Stack frames (16) 15 Exception …/framework/base/db/MysqlDriver.php187 14 framework\base\db\MysqlDriver _connect …/framework/base/db/MysqlDriver.php214 13 framework\base\db\MysqlDriver _getWriteLink …/framework/base/db/MysqlDriver.php44 12 framework\base\db\MysqlDriver execute …/framework/base/db/MysqlDriver.php67 11 framework\base\db\MysqlDriver insert …/framework/base/Model.php82 10 framework\base\Model insert …/app/base/model/BaseModel.php276 9 app\base\model\BaseModel add …/app/duxcms/model/TotalVisitorModel.php42 8 app\duxcms\model\TotalVisitorModel addData …/app/home/controller/SiteController.php18 7 app\home\controller\SiteController __construct …/app/base/controller/ErrorController.php16 6 app\base\controller\ErrorController error …/app/base/hook/AppHook.php19 5 app\base\hook\AppHook appError …/framework/base/Hook.php38 4 call_user_func_array …/framework/base/Hook.php38 3 framework\base\Hook exec …/framework/base/Hook.php25 2 framework\base\Hook listen …/framework/base/App.php81 1 framework\base\App run …/framework/core.php109 0 require …/index.php8 /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php $master = $this->config; unset($master['DB_SLAVE']); foreach($this->config['DB_SLAVE'] as $k=>$v) { $dbArr[] = array_merge($master, $this->config['DB_SLAVE'][$k]); } shuffle($dbArr); } else { $dbArr[] = $this->config; } $link =null; foreach($dbArr as $db) { // 新增阿里云虚机不支持端口链接(安装时不填写端口号) if( $link = @mysqli_connect($db['DB_HOST'] . ( $db['DB_PORT'] ? ':' . $db['DB_PORT'] : '' ), $db['DB_USER'], $db['DB_PWD'], $db['DB_NAME']) ){ break; } } if(!$link){ throw new \Exception('connect database error :'.mysqli_connect_error($link), 500); } $version = mysqli_get_server_info($link); if($version > '4.1') { mysqli_query($link, "SET character_set_connection = " . $db['DB_CHARSET'] . ", character_set_results = " . $db['DB_CHARSET'] . ", character_set_client = binary"); if($version > '5.0.1') { mysqli_query($link, "SET sql_mode = ''"); } } return $link; } protected function _getReadLink() { if( !isset( $this->readLink ) ) { try{ $this->readLink = $this->_connect( false ); }catch(Exception $e){ $this->readLink = $this->_getWriteLink(); } /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php mysqli_query($link, "SET sql_mode = ''"); } } return $link; } protected function _getReadLink() { if( !isset( $this->readLink ) ) { try{ $this->readLink = $this->_connect( false ); }catch(Exception $e){ $this->readLink = $this->_getWriteLink(); } } return $this->readLink; } protected function _getWriteLink() { if( !isset( $this->writeLink ) ) { $this->writeLink = $this->_connect( true ); } return $this->writeLink; } public function __destruct() { if($this->_writeLink) { @mysqli_close($this->_writeLink); } if($this->_readLink) { @mysqli_close($this->_readLink); } } } /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php Hook::listen('dbQueryBegin', array($sql, $params)); $query = mysqli_query( $this->_getReadLink(), $this->getSql() ); if($query){ $data = array(); while($row = mysqli_fetch_array($query, MYSQLI_ASSOC)){ $data[] = $row; } Hook::listen('dbQueryEnd', array($this->getSql(), $data)); return $data; } $err = mysqli_error($this->_getReadLink()); Hook::listen('dbException', array($this->getSql(), $err)); throw new \Exception('Database SQL: "' . $this->getSql(). '". ErrorInfo: '. $err, 500); } public function execute($sql, array $params = array()){ $this->_bindParams( $sql, $params, $this->_getWriteLink()); Hook::listen('dbExecuteBegin', array($sql, $params)); $query = mysqli_query( $this->_getWriteLink(), $this->getSql() ); if($query){ $affectedRows = mysqli_affected_rows( $this->_getWriteLink() ); Hook::listen('dbExecuteEnd', array($this->getSql(), $affectedRows)); return $affectedRows; } $err = mysqli_error($this->_getWriteLink()); Hook::listen('dbException', array($this->getSql(), $err)); throw new \Exception('Database SQL: "' . $this->getSql(). '". ErrorInfo: '. $err, 500); } public function insert($table, array $data){ $values = array(); foreach($data as $k=>$v){ $keys[] = "`{$k}`"; $values[":{$k}"] = $v; $marks[] = ":{$k}"; /www/wwwroot/sdguozhijingyiyuancom/framework/base/db/MysqlDriver.php if($query){ $affectedRows = mysqli_affected_rows( $this->_getWriteLink() ); Hook::listen('dbExecuteEnd', array($this->getSql(), $affectedRows)); return $affectedRows; } $err = mysqli_error($this->_getWriteLink()); Hook::listen('dbException', array($this->getSql(), $err)); throw new \Exception('Database SQL: "' . $this->getSql(). '". ErrorInfo: '. $err, 500); } public function insert($table, array $data){ $values = array(); foreach($data as $k=>$v){ $keys[] = "`{$k}`"; $values[":{$k}"] = $v; $marks[] = ":{$k}"; } $table = $this->_table($table); $status = $this->execute("INSERT INTO {$table} (".implode(', ', $keys).") VALUES (".implode(', ', $marks).")", $values); $id = mysqli_insert_id( $this->_getWriteLink() ); if($id){ return $id; }else{ return $status; } } public function update($table, array $condition = array(), array $data = array()){ if( empty($condition) ) return false; $values = array(); foreach ($data as $k=>$v){ $keys[] = "`{$k}`=:__{$k}"; $values[":__{$k}"] = $v; } $table = $this->_table($table); $condition = $this->_where( $condition ); return $this->execute("UPDATE {$table} SET ".implode(', ', $keys) . $condition['_where'], $condition['_bindParams'] + $values); } /www/wwwroot/sdguozhijingyiyuancom/framework/base/Model.php $table = $this->_getTable(); $where = $this->_getWhere(); //Pagination if( !empty($this->options['pager']) ){ $count = $this->getDb()->Count($table, $where); $this->_pager($this->options['pager']['page'], $this->options['pager']['pageSize'], $this->options['pager']['scope'] = 10, $count); $this->options['pager'] = []; $limit = $this->pager['offset'] . ',' . $this->pager['limit']; } return $this->getDb()->select($table, $where, $field, $order, $limit); } public function insert() { if( empty($this->options['data']) || !is_array($this->options['data']) ) return false; return $this->getDb()->insert($this->_getTable(), $this->_getData()); } public function update() { if( empty($this->options['where']) || !is_array($this->options['where']) ) return false; if( empty($this->options['data']) || !is_array($this->options['data']) ) return false; return $this->getDb()->update($this->_getTable(), $this->_getWhere(), $this->_getData()); } public function delete() { if( empty($this->options['where']) || !is_array($this->options['where']) ) return false; return $this->getDb()->delete($this->_getTable(), $this->_getWhere()); } public function count() { return $this->getDb()->count($this->_getTable(), $this->_getWhere()); } public function getFields() { /www/wwwroot/sdguozhijingyiyuancom/app/base/model/BaseModel.php /** * 设置验证状态 */ public function validate($data = []){ $this->_validate = $data; return $this; } /** * 添加数据 */ public function add($data = []){ if(empty($data)){ $data = $this->options['data']; if(empty($data)){ $data = $this->data; } } return $this->data($data)->insert(); } /** * 保存数据 */ public function save($data = []){ if(empty($data)){ $data = $this->options['data']; if(empty($data)){ $data = $this->data; } } $where = []; if(!empty($this->options['where'])){ $where = $this->options['where']; }else{ if(empty($this->primary)){ $data = $this->format_data_by_fill($data); } $where[$this->primary] = $data[$this->primary]; /www/wwwroot/sdguozhijingyiyuancom/app/duxcms/model/TotalVisitorModel.php } /** * 增加访问 */ public function addData(){ //当天时间 $time = strtotime(date('Y-m-d')); $where = array(); $where['time'] = $time; $info = $this->where($where)->find(); if($info){ $where = array(); $where['id'] = $info['id']; $this->where($where)->setInc('count'); }else{ $data = array(); $data['time'] = $time; $data['count'] = 1; $this->add($data); } } /** * 增加访问 */ public function addApi(){ //当天时间 $time = strtotime(date('Y-m-d')); $where = array(); $where['time'] = $time; $info = $this->where($where)->find(); if($info){ $where = array(); $where['id'] = $info['id']; $this->where($where)->setInc('api'); }else{ $data = array(); $data['time'] = $time; $data['api'] = 1; /www/wwwroot/sdguozhijingyiyuancom/app/home/controller/SiteController.php <?php namespace app\home\controller; use app\base\controller\BaseController; /** * 前台公共类 */ class SiteController extends BaseController { public function __construct() { parent::__construct(); //设置手机版参数 if(isset($_GET['mobile']) || MOBILE){ config('tpl_name' , config('mobile_tpl')); } //设置常量 define('TPL_NAME', config('tpl_name')); //访问统计 target('duxcms/TotalVisitor')->addData(); target('duxcms/TotalSpider')->addData(); target('duxcms/TotalSpiderInfo')->addData(); } /** * 前台模板显示 调用内置的模板引擎 * @access protected * @param string $name 模板名 * @param bool $type 模板输出 * @return void */ protected function siteDisplay($name='',$type = true) { $tpl = THEME_NAME . '/' . TPL_NAME . '/' . $name; if($type){ $this->display($tpl); }else{ return $this->display($tpl,true); } } /** * 页面Meda信息组合 * @return array 页面信息 */ /www/wwwroot/sdguozhijingyiyuancom/app/base/controller/ErrorController.php <?php namespace app\base\controller; use framework\base\Controller; class ErrorController extends Controller{ public function error404($e=null){ // header('HTTP/1.1 404 Not Found'); // header("status: 404 Not Found"); $this->error($e); } public function error($e=null){ //关闭调试或者是线上版本,不显示详细错误 if( false==config('DEBUG') || 'production' == config('ENV') ){ $home = new \app\home\controller\IndexController(); $home->error404(); //记录错误日志 }else{ throw $e; } } } /www/wwwroot/sdguozhijingyiyuancom/app/base/hook/AppHook.php <?php namespace app\base\hook; class AppHook{ public $startTime = 0; public function appBegin(){ $this->startTime = microtime(true); } public function appEnd(){ // echo microtime(true) - $this->startTime ; } public function appError($e){ if( 404 == $e->getCode() ){ $action = 'error404'; }else{ $action = 'error'; } obj('app\base\controller\ErrorController')->$action($e); } public function routeParseUrl($rewriteRule, $rewriteOn){ } public function actionBefore($obj, $action){ } public function actionAfter($obj, $action){ } } /www/wwwroot/sdguozhijingyiyuancom/framework/base/Hook.php } } static public function listen($tag, $params=array(), &$result=null){ if( !isset(self::$tags[$tag]) ) return false; foreach(self::$tags[$tag] as $class){ $result = self::exec($class, $tag, $params); if(false === $result) { break; } } return true; } static protected function exec($class, $method, $params){ static $objArr = array(); if( !isset($objArr[$class]) ){ $objArr[$class]= new $class(); } return call_user_func_array(array($objArr[$class], $method), (array)$params); } } /www/wwwroot/sdguozhijingyiyuancom/framework/base/Hook.php } } static public function listen($tag, $params=array(), &$result=null){ if( !isset(self::$tags[$tag]) ) return false; foreach(self::$tags[$tag] as $class){ $result = self::exec($class, $tag, $params); if(false === $result) { break; } } return true; } static protected function exec($class, $method, $params){ static $objArr = array(); if( !isset($objArr[$class]) ){ $objArr[$class]= new $class(); } return call_user_func_array(array($objArr[$class], $method), (array)$params); } } /www/wwwroot/sdguozhijingyiyuancom/framework/base/Hook.php static public function init($basePath=''){ $dir = str_replace('/', DIRECTORY_SEPARATOR, $basePath.'app/base/hook/'); foreach(glob($dir . '*.php') as $file){ $pos = strrpos($file, DIRECTORY_SEPARATOR); if( false === $pos ) continue; $class = substr($file, $pos + 1, -4); $class = "\\app\\base\\hook\\{$class}"; $methods = get_class_methods($class); foreach((array)$methods as $method){ self::$tags[$method][] = $class; } } } static public function listen($tag, $params=array(), &$result=null){ if( !isset(self::$tags[$tag]) ) return false; foreach(self::$tags[$tag] as $class){ $result = self::exec($class, $tag, $params); if(false === $result) { break; } } return true; } static protected function exec($class, $method, $params){ static $objArr = array(); if( !isset($objArr[$class]) ){ $objArr[$class]= new $class(); } return call_user_func_array(array($objArr[$class], $method), (array)$params); } } /www/wwwroot/sdguozhijingyiyuancom/framework/base/App.php Route::parseUrl( Config::get('REWRITE_RULE'), Config::get('REWRITE_ON') ); } $layer_name = !defined('LYAER_NAME')?'Controller':LYAER_NAME; //execute action $controller = '\app\\'. APP_NAME .'\\'.lcfirst($layer_name).'\\'. CONTROLLER_NAME .$layer_name; $action = ACTION_NAME; if( !class_exists($controller) ) { throw new \Exception("Controller '{$controller}' not found", 404); } $obj = new $controller(); if( !method_exists($obj, $action) ){ throw new \Exception("Action '{$controller}::{$action}()' not found", 404); } Hook::listen('actionBefore', array($obj, $action)); $obj ->$action(); Hook::listen('actionAfter', array($obj, $action)); } catch( \Exception $e ){ Hook::listen('appError', array($e)); } Hook::listen('appEnd'); } } /www/wwwroot/sdguozhijingyiyuancom/framework/core.php if( !isset($fileList[$fileDIR]) ){ $fileList[$fileDIR] = array(); foreach(glob($fileDIR.'*.php') as $file){ $fileList[$fileDIR][] = $file; } } $fileBase = $baseDir.str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.$className; foreach($fileList[$fileDIR] as $file){ if( false!==stripos($file, $fileBase) ){ require $file; return true; } } } } return false; }); App::run(); /www/wwwroot/sdguozhijingyiyuancom/index.php <?php if (version_compare(PHP_VERSION, '5.3.0','<')) { header("Content-Type: text/html; charset=UTF-8"); echo 'PHP环境不能低于5.3.0'; exit; } require( 'framework/core.php' ); Environment & details: GET Data empty POST Data empty Files empty Cookies empty Session empty Server/Request Data Key Value USER www HOME /home/www SCRIPT_NAME /index.php REQUEST_URI / QUERY_STRING REQUEST_METHOD GET SERVER_PROTOCOL HTTP/1.1 GATEWAY_INTERFACE CGI/1.1 REMOTE_PORT 46258 SCRIPT_FILENAME /www/wwwroot/sdguozhijingyiyuancom/index.php SERVER_ADMIN webmaster@example.com CONTEXT_DOCUMENT_ROOT /www/wwwroot/sdguozhijingyiyuancom/ CONTEXT_PREFIX REQUEST_SCHEME https DOCUMENT_ROOT /www/wwwroot/sdguozhijingyiyuancom/ REMOTE_ADDR 60.205.58.245 SERVER_PORT 443 SERVER_ADDR 172.26.230.28 SERVER_NAME www.sdguozhijing.com SERVER_SOFTWARE Apache SERVER_SIGNATURE <address>Apache Server at www.sdguozhijing.com Port 443</address> LD_LIBRARY_PATH /www/server/apache/lib PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin HTTP_USER_AGENT Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0 HTTP_ACCEPT */* HTTP_HOST www.sdguozhijing.com proxy-nokeepalive 1 SSL_TLS_SNI www.sdguozhijing.com HTTPS on SCRIPT_URI https://www.sdguozhijing.com/ SCRIPT_URL / FCGI_ROLE RESPONDER PHP_SELF /index.php REQUEST_TIME_FLOAT 1779396314.3185 REQUEST_TIME 1779396314 Environment Variables empty Registered Handlers 0. Whoops\Handler\PrettyPageHandler
网站标题
医用家具生产厂家 医院办公家具定制-国之景医院家具公司
关键词
医院家具,医院家具厂家,医用家具,医院办公家具
站点描述
山东国之景医院家具公司专门定做医院办公家具、设计生产护士站、导诊台、治疗柜、处置柜、诊桌、分诊台等医用家具厂家,为客户提供一站式定制医养家具项目工程投标服务以及医疗家具整体配套解决方案!