Differences between Windows and Linux in font paths_PHP tutorial

WBOY
Release: 2016-07-13 17:37:33
Original
1098 people have browsed it

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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!