public function debug()
 {
     session_start();
     //print_r(json_decode($_GET['online_debug'], true));
     $onlineDebugDB = new OnlineDebugModelDB();
     $insertArr = array();
     $insertArr['pid'] = $_POST['pid'];
     $insertArr['domain'] = $_POST['domain'];
     $insertArr['request'] = $_POST['request'];
     $insertArr['response'] = $_POST['response'];
     $insertArr['html'] = $_POST['html'];
     $insertArr['debug_msg'] = $_POST['debug_msg'];
     $insertArr['client_ip'] = $_POST['client_ip'];
     $insertArr['server_ip'] = $_SERVER['REMOTE_ADDR'];
     $insertArr['datetime'] = time();
     $rs = $onlineDebugDB->insert($insertArr);
     $rs ? Message::showSucc('添加成功') : Message::showError('添加失败:' . implode(" ", $onlineDebugDB->getErrorInfo()));
 }
 public function create()
 {
     $onlineDebugDB = new OnlineDebugModelDB();
     $fieldArr = $onlineDebugDB->getFields();
     $insertArr = array();
     foreach ($fieldArr as $v) {
         if ($_POST[$v] !== null) {
             $insertArr[$v] = $_POST[$v];
         }
     }
     $rs = $onlineDebugDB->insert($insertArr);
     Log::write($this->adminUserName, $this->ip, $onlineDebugDB->insertId(), self::$state . "__" . self::$action, $rs);
     $rs ? Message::showSucc('添加成功') : Message::showError('添加失败:' . implode(" ", $onlineDebugDB->getErrorInfo()));
 }