当用PHP导出excel表格的时候,遇到比如说是微信昵称中带标签的,就会导出失败,可以这么转换:
$nickname = json_encode($nickname); $nickname_replace = preg_replace("/\\\u[ed][0-9a-f]{3}\\\u[ed][0-9a-f]{3}/","*",$nickname);//替换成* $nick = json_decode($nickname_replace);