开发者

Call to undefined function imagefttext()

I have this script:

<?php
$im = imagecreatetruecolor(300, 150);
imagettftext($a, $b, $c, $d, $e);
imagepng($im);
?>

I compiled with:

Configure Command =>  './configure'  '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-mbstring' '--enable-sockets' '--with-bz2' '--with-curl' '--with-gd' '--enable-gd-native-ttf' '--with-jpeg-dir=/opt' '--with-png-dir=/opt' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mcrypt' '--with-mysql' '--with-mysqli' '--with-openssl' '--with-zlib' '--enable-zip'

I am getting the following error

PHP Fatal error:  Call to undefined function imagefttext() in /root/test.php on line 9

I am running CentOS, and I have gd-devel, freetype-devel, among other packages. I'm not sure why it's not working. Anyone ha开发者_开发技巧ve any ideas?

Thanks in advance!


There seem to be at least two .configure flags missing:

 --with-freetype-dir=/usr --enable-gd-native-ttf

see the GD installation instructions.


If the error message is to be believed, you probably meant to type imagettftext() rather than imagefttext() in your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜