完美解决关于php gd生成中文字符乱码的问题

php教程9年前 (2016-05-25)14250
$font_file = 'font/simhei.ttf';
header("Content-type: image/png");
$im = imagecreate(200,60);
$bg = imagecolorallocate($im,255,255,255);
$color = imagecolorallocate($im, 0, 0, 255);
imagestring($im, 5, 0, 0, $qq, $color);
imagefttext($im, 13, 0, 0, 35, $color, $font_file,mb_convert_encoding('热片看看网','html-entities','UTF-8'););
imagestring($im, 20, 0, 40, $email, $color);
imagepng($im);


“完美解决关于php gd生成中文字符乱码的问题” 的相关文章

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。