如何解决php imagettftext 乱码问题

php 使用ImageTTFText 中文出现乱码:

可以用

string mb_convert_encoding ( string $str, string $to_encoding [, mixed $from_encoding] )

来进行转码,再输出

$str = mb_convert_encoding($str, "UTF-8", "GB2312");

确认一下文件是不是utf-8的。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容