1 2 3 4 5 6 7 8 9 10 11 |
$data = $this->input->post(); //json_decode($dataObj, true); if ($data == false){ $data = file_get_contents('php://input'); if($data == false){ $this->fail_response('參數錯誤', 'E98'); }else{ $data = json_decode($data, true); } } logg($data); |