(CI restAPI) ajax put 전송
javascript php public function targets_edit_put() { header("Access-Control-Allow-Origin:*"); $_POST = json_decode($this->security->xss_clean(file_get_contents("php://input")), true); $this->form_validation->set_data([ 'idx' => $this->input->input_stream('idx', TRUE), 'name' => $this->input->input_stream('name', TRUE) ]); $this->form_validation->set_rules('idx', 'Idx', 'trim|required', array('req..