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

后端开发   发布日期:2025年05月19日   浏览次数:153
  1. $font_file = 'font/simhei.ttf';
  2. header("Content-type: image/png");
  3. $im = imagecreate(200,60);
  4. $bg = imagecolorallocate($im,255,255,255);
  5. $color = imagecolorallocate($im, 0, 0, 255);
  6. imagestring($im, 5, 0, 0, $qq, $color);
  7. imagefttext($im, 13, 0, 0, 35, $color, $font_file,mb_convert_encoding('富富鱼网络科技有限公司','html-entities','UTF-8'););
  8. imagestring($im, 20, 0, 40, $email, $color);
  9. imagepng($im);

  

以上就是完美解决关于php gd生成中文字符乱码的问题的详细内容,更多关于完美解决关于php gd生成中文字符乱码的问题的资料请关注九品源码其它相关文章!