Home  >  Article  >  Backend Development  >  Differences between Windows and Linux in font paths_PHP tutorial

Differences between Windows and Linux in font paths_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:37:331139browse

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);

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486558.htmlTechArticleImageTTFText($im,16,0,70,30,$blue,"./simkai.ttf", $char); Use this function to use a text path. Since the paths in Windows and Linux systems are different, you can copy the font file to the program file...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn