Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将文本和表情符号从android发送到php?_Php_Android_Mysql_Emoji - Fatal编程技术网

将文本和表情符号从android发送到php?

将文本和表情符号从android发送到php?,php,android,mysql,emoji,Php,Android,Mysql,Emoji,我试图通过php将android的text+emoji发送到另一个android,在php中我编写了插入mysql的代码,一切正常,但当它进入表中时,结果变为问号“?” 我试图找到关于这个的教程,但我无法在我的应用程序中尝试 我尝试使用json数组发送文本+表情符号 我在java中使用此代码发送到php HttpClient client = new DefaultHttpClient(); HttpResponse response; try{ HttpPost post = new

我试图通过php将android的text+emoji发送到另一个android,在php中我编写了插入mysql的代码,一切正常,但当它进入表中时,结果变为问号“?” 我试图找到关于这个的教程,但我无法在我的应用程序中尝试

我尝试使用json数组发送文本+表情符号

我在java中使用此代码发送到php

HttpClient client = new DefaultHttpClient();
HttpResponse response;
try{
    HttpPost post = new HttpPost(url);
    List<NameValuePair> nVP = new ArrayList<NameValuePair>(2);  
    nVP.add(new BasicNameValuePair("mydata", paketan.toString()));  //studentJson is the JSON input
    post.setEntity(new UrlEncodedFormEntity(nVP,"UTF-8"));
    response = client.execute(post);
    response.setHeader("Content-Type", "application/json; charset=utf-8");
    hsl = org.apache.http.util.EntityUtils.toString(response.getEntity());
HttpClient=newdefaulthttpclient();
HttpResponse响应;
试一试{
HttpPost=新的HttpPost(url);
列表nVP=新阵列列表(2);
添加(新的BasicNameValuePair(“mydata”,paketan.toString());//studentJson是JSON输入
post.setEntity(新的UrlEncodedFormEntity(nVP,“UTF-8”);
响应=client.execute(post);
setHeader(“内容类型”,“应用程序/json;字符集=utf-8”);
hsl=org.apache.http.util.EntityUtils.toString(response.getEntity());
这将在eclipse中登录


[{“时间”:“2015-07-09 14:21:17”,“消息”:“测试表情符号确保表的排序规则也是utf8mb4_unicode_ci是否检查了@Vatev的字符代码:我的表被设置为utf8mb4_unicode_ci,但仍然不起作用properly@haike00是的,我有,你是说这可能是不相关的,但是
stripslashes(str\u replace(“\”,““”,$”POST[“mydata”]的目的是什么))
?确保表的排序规则也是utf8mb4\u unicode\u ci您是否检查了@Vatev的字符代码:我的表被设置为utf8mb4\u unicode\u ci,但仍然无效properly@haike00是的,我有,你是说这可能是不相关的,但是
stripslashes(str\u replace(“\”,““”,$”POST[“mydata”])的目的是什么)