ImageTTFText($im,16,0,70,30,$blue,"./simkai.ttf",$char);
Use this function to use the text path. Since the paths in Windows and Linux systems are different
, you can copy the font file to The current directory of the program file is called
. For example, when using simkai under Windows, the simsun font is in. Under Windows, just enter its absolute address windows/font/simkai.ttf. But it cannot be used in Linux. Copy everything to the current program directory. Note that Linux Pay attention to the case and
get the absolute path through $_SERVER
ImageTTFText($im,16,0,70,30,$blue,"$path/simkai.ttf",$char);