当我们在使用imggettftext 函数的时候会遇到这个问题
imagettftext(): any2eucjp(): invalid code in input string
一切都没有错 这个是php的一个bug
https://bugs.php.net/bug.php?id=42218
原因 编译php的时候 --enable-gd-jis-conv 开启这个选项
这个是对 日文的支持
即使我们使用的 utf8 编码 (imagettftext 只支持 utf8 编码) 但是还是会被识别成 日文(日文同样是方块字)
不修改php参数的情况下还没找到解决方案
目前的办法只能是 重新编译 php 取消 --enable-gd-jis-conv 这个参数
以上就介绍了imagettftext: any2eucjp: invalid code in input string,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号