php接收android发送的json数据?解决思路

WBOY
Release: 2016-06-13 12:52:49
Original
785 people have browsed it

php接收android发送的json数据?
$response = array();
include("conn.php");
$conn=mysql_open();
$sql =mysql_query('set names utf8'); 
mysql_query($sql);
if (isset($_POST['name'])) {……………………为甚么会提示未定义的name呢?name就是android发送过来的

android json php
------解决方案--------------------
引用:
引用:你不是json么?你发送的内容是什么?你这么问别人怎么知道呢.出错的信息又是什么呢?就是个提示吧谢谢斑竹提示。android端
params.add(new BasicNameValuePair("name", name));
JSONObject json = jsonParser.makeHttpRequest(url_u……


看是否获取到name,你可以讲值保存到文件中。因为安卓程序一打开就调用你的php文件了,你再打开文件,肯定妹纸了
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template