当前位置:网站首页>phpexcel导出emoji符号报错
phpexcel导出emoji符号报错
2022-07-26 09:23:00 【为天空着色】
原文:http://blog.csdn.net/SakuraLLj/article/details/72823765
phpexcel导出用户数据成excel时,如果昵称包含表情,会导致数据不完整。
过滤或替换emoji。因为emoji通过json_encode后,大部分都是u[ed] 开头的编码,所以先对昵称json_encode然后用正则过滤或替换成*,以下时相关代码:
$value = json_encode($value);
$value = preg_replace("/\\\u[ed][0-9a-f]{3}\\\u[ed][0-9a-f]{3}/","*",$value);//替换成*
$value = json_decode($value);
边栏推荐
猜你喜欢

STM32+MFRC522完成IC卡号读取、密码修改、数据读写

Advanced mathematics | Takeshi's "classic series" daily question train of thought and summary of error prone points

Server memory failure prediction can actually do this!

【线上死锁分析】由index_merge引发的死锁事件

【线上问题】Timeout waiting for connection from pool 问题排查

多项式开根

使用openLayer画箭头

arc-gis的基本使用2

Redis principle and use - Basic Features

Grain College of all learning source code
随机推荐
756. Serpentine matrix
antUI中a-modal 拖拽功能制作
省政府召开全省高温天气安全防范工作电视电话会议
点击input时,不显示边框!
Laravel框架日志文件存放在哪里?怎么用?
OFDM 十六讲- OFDM
What are CSDN spaces represented by
The problem of the sum of leetcode three numbers
Tornado multi process service
Elastic APM installation and use
NTT (fast number theory transformation) polynomial inverse 1500 word analysis
a-table中的rowSelection清空问题
JS closure: binding of functions to their lexical environment
[arkit, realitykit] turn pictures into 3D models
Your login IP is not within the login mask configured by the administrator
微信小程序开发
QT | about how to use EventFilter
Processing of inconsistent week values obtained by PHP and MySQL
"Could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32"
语音聊天app源码——钠斯直播系统源码