手机端的------// 提交反馈信息,这是post方式提交
服务端,php不懂说以,你再找找,跟客户端关系不大
public String user_feedback(String feedbackType,String feedbackContent,String contacts) {
ArrayList
nv.add(new BasicNameValuePair("userId", this.user.userid));
nv.add(new BasicNameValuePair("feedbackType", feedbackType));
nv.add(new BasicNameValuePair("feedbackContent",feedbackContent));
nv.add(new BasicNameValuePair("userContact",contacts));
nv.add(new BasicNameValuePair("permit", this.user.permit));
DefaultHttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost(uri);
String strResult = "";
try {
HttpEntity entity = new UrlEncodedFormEntity(nv, "UTF-8");
post.setEntity(entity);
// 获得HttpResponse对象
HttpResponse httpResponse = client.execute(post);
if (httpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
// 取得返回的数据
strResult = EntityUtils.toString(httpResponse.getEntity());
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Log.i("jsonHelper", strResult);
return strResult;
}
get,post
php接受:
$_GET['参数名']
$_POST['参数名']