php安装freetype的方法:首先执行命令“make && make install”安装freeType;然后安装GD包括freetype;接着切换到PHP ext源码目录;最后重启php服务即可。
推荐:《PHP视频教程》
PHP Fatal error: Call to undefined function imagettftext()错误提示是指GD库中缺少freetype库,你装了GD不一定就支持freetype,很多人理解错误,freetype 不是一个独立的扩展,是附着在GD库上的。freeType官方下载地址:https://HdhCmsTestfreetype.org/download.html
第一步安装freeType
./configure --prefix=/usr/local/freetype make && make install第二步安装GD包括freetype
切换到PHP ext源码目录
/opt/php5/bin/phpize ./configure --with-php-config=/opt/php5/bin/php-config --with-jpeg-dir=/usr/local/jpeg/lib --with-freetype-dir=/usr/local/freetype --enable-gd-native-ttf make && make install如果没有安装过gd 把gd.so 写入php.ini
如果以前装过gd 直接重启php服务即可
以上就是php如何安装freetype的详细内容!
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did54610
php如何安装freetype
阅读:119次