Home > Article > Backend Development > Differences between Windows and Linux in font paths_PHP tutorial
ImageTTFText($im,16,0,70,30,$blue,"./simkai.ttf",$char); Using this function is a literal path because the paths in Windows and Linux systems are different So you can copy the font file to the current directory of the program file and call it For example, when using simkai. simsun font in Windows, just enter its absolute address windows/font/simkai.ttf in Windows, but it cannot be used in Linux. Copy everything to the current program directory. Pay attention to the size in Linux. Write Get the absolute path through $_SERVER ImageTTFText($im,16,0,70,30,$blue,"$path/simkai.ttf",$char);