public function savecell() { try { $excel = new Excel(); $col = filter_input(INPUT_POST, 'col', FILTER_SANITIZE_NUMBER_INT); $row = filter_input(INPUT_POST, 'row', FILTER_SANITIZE_NUMBER_INT); $value = filter_input(INPUT_POST, 'value', FILTER_SANITIZE_STRING); $param = array('col' => $col, 'row' => $row, 'value' => $value); $excel->save_cell_value($param); $result = array('status' => 'OK', 'msg' => $value); echo json_encode($result); } catch (Exception $ex) { $result = array('status' => 'ERROR', 'msg' => $ex->getMessage()); echo json_encode($result); } }