Database SQL: "update qt_sources set views=COALESCE(views, 0) + 1 WHERE id=376846", ErrorInfo: The MySQL server is running with the --read-only option so it cannot execute this statement

344.              }
345.          }
346.          
347.          if($sth->execute())return $readonly $sth->fetchAll(PDO::FETCH_ASSOC) : $sth->rowCount();
348.          $err $sth->errorInfo();
349.          err('Database SQL: "' $sql'", ErrorInfo: '$err[2], 1);
350.      }
351.      
352.      public function dbInstance($db_config$db_config_key$force_replace false){
353.          if($force_replace || empty($GLOBALS['mysql_instances'][$db_config_key])){
354.              try {
316.              }
317.          }
318.          return $this->page;
319.      }
320.      
321.      public function query($sql$params = array()){return $this->execute($sql$paramstrue);}
322.      public function execute($sql$params = array(), $readonly false){
323.          $this->sql[] = $sql;
324. 
325.          if($readonly && !empty($GLOBALS['mysql']['MYSQL_SLAVE'])){
326.              $slave_key array_rand($GLOBALS['mysql']['MYSQL_SLAVE']);
141.      }
142.      // 增加计数
143.      function actionaddcount(){
144.          $id arg("id",0);
145.          $source = new QtSources();
146.          $upid $source->query("update qt_sources set views=COALESCE(views, 0) + 1 WHERE id=".$id);
147.      }
148.      // 影视资源详情列表
149.      function actionmoviedetail(){
150.          $id arg("id",0);
151.          $QtMovies = new QtMovies();
91.      exit;
92.  };
93.  if(!method_exists($controller_name$action_name))_err_router("Err: Method '$action_name' of '$controller_name' is not exists!");
94. 
95.  $controller_obj = new $controller_name();
96.  $controller_obj->$action_name();
97. 
98.  if($controller_obj->_auto_display){
99.      $auto_tpl_name = (empty($__module) ? '' $__module.DS).$__controller.'_'.$__action.'.html';
100.      if(file_exists(APP_DIR.DS.'protected'.DS.'view'.DS.$auto_tpl_name))$controller_obj->display($auto_tpl_name);
101.  }
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');