好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

如何解决php imagettftext 乱码问题

php imagettftext乱码的解决办法:首先通过“mb_convert_encoding”函数进行转码;然后通过语句“mb_convert_encoding($str, "UTF-8", "GB2312");”输出即可。

推荐:《PHP视频教程》

php 使用ImageTTFText 中文出现乱码:

可以用

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

来进行转码,再输出

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

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

以上就是如何解决php imagettftext 乱码问题的详细内容!

查看更多关于如何解决php imagettftext 乱码问题的详细内容...

  阅读:38次