login_user_id; $room_type=isset($_REQUEST['room_type'])?$_REQUEST['room_type']:""; // 不为空 $hotel_id=isset($_REQUEST['hotel_id'])?$_REQUEST['hotel_id']:""; // 不为空 if(empty($room_type) || empty($hotel_id)){ $data['code']="16"; $data['info']="错误的请求参数"; return $data; } $childRoom = new HTChildRoom; $data=$childRoom->doCancelChildRoom($user_id, $room_type, $hotel_id); return $data; } } $obj=new CancelChildRoom; $data=$obj->cancelRoom(); echo json_encode($data);