当前位置: 首页 > 后端技术 > PHP

解决PHP str_replace方法转换GBK个别中文乱码问题

时间:2023-03-29 22:54:38 PHP

解决PHPstr_replace方法转换GBK个别中文乱码问题content=mb_convert_encoding($content,$to_encoding,$from_encoding);$str=mb_convert_encoding(" ",$to_encoding,$from_encoding);$content=mb_eregi_replace($str,"",$content);$content=mb_convert_encoding($content,$from_encoding,$to_encoding);$内容=修剪($内容);返回$内容;}$follow_up_message=str_replace(".",".".
",$data['follow_up_message']);echombStrreplace($follow_up_message);?>