We will encounter this problem when we use the imggettftext function
imagettftext(): any2eucjp(): invalid code in input string
Everything is correct. This is a bug in PHP
https:/ /bugs.php.net/bug.php?id=42218
Reason: When compiling php --enable-gd-jis-conv turns on this option
This is support for Japanese
Even if we use utf8 encoding (imagettftext only supports utf8 encoding), it will still be recognized as Japanese (Japanese is also a square character)
I haven’t found a solution without modifying the php parameters
The current method is only You can recompile php and cancel the --enable-gd-jis-conv parameter
The above has introduced imagettftext: any2eucjp: invalid code in input string, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.