2011-08-24 144 views
1

我有此腳本:調用未定義功能imagefttext()

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' 

我收到以下錯誤

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

我運行CentOS的:

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

我編譯,並且我有gd-devel,freetype-devel和其他軟件包。我不確定它爲什麼不起作用。有人有主意嗎?

在此先感謝!

+1

你是顯示的代碼是從錯誤信息 –

+0

我的壞不同。致命錯誤:調用未定義函數imagettftext() – Tech163

+0

'此函數需要GD庫和»FreeType庫。' – mario

回答

2

如果錯誤信息是可信的,那麼您可能打算在代碼中輸入imagettftext()而不是imagefttext()。

+0

由於某種原因,imagettftext或imagefttext都不起作用。 – Tech163