Database Err: SQLSTATE[HY000] [1049] Unknown database 'novel_plus'

373.              try {
374.                  if(!class_exists("PDO") || !in_array("mysql",PDO::getAvailableDrivers(), true)){
375.                      err('Database Err: PDO or PDO_MYSQL doesn\'t exist!');
376.                  }
377.                  $GLOBALS['mysql_instances'][$db_config_key] = new PDO('mysql:dbname='.$db_config['MYSQL_DB'].';host='.$db_config['MYSQL_HOST'].';port='.$db_config['MYSQL_PORT'], $db_config['MYSQL_USER'], $db_config['MYSQL_PASS'], array(PDO::MYSQL_ATTR_INIT_COMMAND=>'SET NAMES \''.$db_config['MYSQL_CHARSET'].'\''));
378.              }catch(PDOException $e){err('Database Err: '.$e->getMessage());}
379.          }
380.          return $GLOBALS['mysql_instances'][$db_config_key];
381.      }
382.      
383.      private function _where($conditions){
343. 
344.          if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
345.              $slave_key array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
346.              $sth $this->dbInstance($GLOBALS['mysql']['MYSQL_SLAVE'][$slave_key], 'slave_'.$slave_key)->prepare($sql);
347.          }else{
348.              $sth $this->dbInstance($GLOBALS['mysql'], 'master')->prepare($sql);
349.          }
350.          
351.          if(is_array($params) && !empty($params)){
352.              foreach($params as $k => &$v){
353.                  if(is_int($v)){
335.              }
336.          }
337.          return $this->page;
338.      }
339.      
340.      public function query($sql$params = array()){return $this->execute($sql$paramstrue);}
341.      public function execute($sql$params = array(), $readonly false){
342.          $this->sql[] = $sql;
343. 
344.          if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
345.              $slave_key array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
255.              $limit $this->pager($limit[0], $limit[1], $limit[2], $total[0]['M_COUNTER']);
256.              $limit = empty($limit) ? '' ' LIMIT '.$limit['offset'].','.$limit['limit'];            
257.          }else{
258.              $limit = !empty($limit) ? ' LIMIT '.$limit '';
259.          }
260.          return $this->query('SELECT '$fields $sql $sort $limit$conditions["_bindParams"]);
261.      }
262.      
263.      public function find($conditions = array(), $sort null$fields '*'){
264.          $res $this->findAll($conditions$sort$fields1);
265.          return !empty($res) ? array_pop($res) : false;
259.          }
260.          return $this->query('SELECT '$fields $sql $sort $limit$conditions["_bindParams"]);
261.      }
262.      
263.      public function find($conditions = array(), $sort null$fields '*'){
264.          $res $this->findAll($conditions$sort$fields1);
265.          return !empty($res) ? array_pop($res) : false;
266.      }
267.      
268.      public function update($conditions$row){
269.          $values = array();
10.      public $keywords "";
11.      public $description "";
12.      function __construct(){
13.          parent::__construct();
14.          $websiteInfo = new WebSiteInfo();
15.          $this->webSiteInfo $websiteInfo->find(["id"=>1]);
16.          $this->title $this->webSiteInfo["name"];
17.          $this->keywords $this->webSiteInfo["keyword"];
18.          $this->description $this->webSiteInfo["description"];
19.          GLOBAL $__controller$__action;
20.          $this->oplink strtolower($__controller)."_".strtolower($__action); 
7.      private $COMMENT_LIKE_KEY_PREFIX "like:comment:";
8.      private $COMMENT_REPLY_LIKE_KEY_PREFIX "like:comment:reply:";
9.      private $COMMENT_UN_LIKE_KEY_PREFIX "unlike:comment:";
10.      private $COMMENT_REPLY_UN_LIKE_KEY_PREFIX "unlike:comment:reply:";    
11.      function __construct(){
12.          parent::__construct();
13.          $this->secretKey $GLOBALS['JWT_SECRET_KEY'];
14.      }
15.      /**
16.       全部作品
17.      */
110.      // header("Location:".$url);
111.      // exit;
112.  };
113.  if(!method_exists($controller_name$action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
114. 
115.  $controller_obj = new $controller_name();
116.  $controller_obj->$action_name();
117. 
118.  if($controller_obj->_auto_display){
119.      $auto_tpl_name = (empty($__module) ? '' $__module.DS).$__controller.'_'.$__action.'.html';
120.      if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
3.  header('Access-Control-Allow-Origin: *');
4.  header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
5.  header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');
6.  define('APP_DIR'realpath('./'));
7.  define("APP_PATH",dirname(__FILE__));
8.  require(APP_DIR.'/protected/lib/speed.php');