我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

由JS发送的PHP 7.1解码表情符号

I've sent a query string like this by JS to a PHP 7.1 app

?com=item&title=Hello%uD83D%uDE99

and should get

Hello

Added this line:

this.queryText = this.queryText.replace(/\%(u[0-9a-f]{4})/ig, '\\$1');

before

xr.send(this.queryText);
this.span = null;

in JsHttpRequest.js:422 to fix query string

ThanX to all

近期文章

  • 按照MVC样式在PHP中保存数据库中的IP地址
  • 混合PHP和HTML,解析错误:语法错误,意外的文件结尾[重复]
  • PHP空变量内部条件
  • 如何将日期开始结束分组到数组?
  • 优化此PHP代码的提示
  • 安装elephant.io没有作曲家
  • 使用php和ajax实时获取数据
  • 如何在PHP中删除重复的数组对象?
  • 错误PHP更新Mysql行
  • 如何使用PHP / Codeigniter中的给定序列生成唯一的票号
  • 使用php将数组插入MySQL
  • 变量在If语句中不起作用
  • 如何向两个方向发送行动表格?
  • 为什么mysqli_num_rows总是返回false [duplicate]
  • 从数组中获取值
  • VueJS 2 vue-router 2(laravel 5.3)
  • 无法在phpMyAdmin中添加图像路径
  • 从JSON中排序特定对象
  • 将删除按钮添加到表中
  • 在php中按列Date计算列的总和

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华