Differences between the font path Windows and Linux. ImageTTFText ($ im, 16, 0, 70, 30, $ blue ,. simkai. ttf, $ char); use this function to copy the font file to the program file because the path is different in Windows and Linux.
ImageTTFText ($ im, 16, 0, 70, 30, $ blue, "./simkai. ttf", $ char );
This function is a text path because the paths in Windows and Linux are different.
So, you can copy the font file to the current directory of the program file.
For example, simkai is used in Windows. the simsun font is in Windows. you can enter her absolute address in windows/font/simkai. ttf cannot be used in Linux, and all copies to the current program directory should be case-sensitive in Linux.
Get the absolute path through $ _ SERVER.
ImageTTFText ($ im, 16, 0, 70, 30, $ blue, "$ path/simkai. ttf", $ char );
Http://www.bkjia.com/PHPjc/486558.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486558.htmlTechArticleImageTTFText ($ im, 16, 0, 70, 30, $ blue ,". /simkai. ttf ", $ char); use this function to copy the font file to the program file because the path is different in Windows and Linux...