Home > php教程 > php手册 > 关于字体路径Windows和Linux差异

关于字体路径Windows和Linux差异

WBOY
Release: 2016-06-13 10:36:21
Original
985 people have browsed it

ImageTTFText($im,16,0,70,30,$blue,"./simkai.ttf",$char);

使用此函数是文字路径由于在Windows和Linux系统路径不一样

所以可以吧字体文件拷贝到程序文件当前目录调用

比如在Windows下使用simkai. simsun字体在,Windows下输入她的绝对地址就可以了windows/font/simkai.ttf 但在Linux就无法用了,所有拷贝到当前程序目录,注意Linux注意大小写

通过$_SERVER获取绝对路径即可

ImageTTFText($im,16,0,70,30,$blue,"$path/simkai.ttf",$char);

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template