[PHP]当mb_substr函数结果出现乱码

在代码前加入

mb_internal_encoding(“GB2312”);

mb_internal_encoding(“UTF-8”);

就解决了问题.

但是原理暂时不清楚.

Posted: 九月 12th, 2019


Subscribe for email updates

发表评论

Note: Wrap all of your code blocks in <code>...</code> and replace < and > with &lt; and &gt;, respectively.