2017-02-21 24 views
1

我現在正在研究一個新的應用程序,我需要計算一個字符串長度像素與指定的字體。我決定在laravel中使用imagettfbbox()。在Laravel中使用imagettfbbox()

但是,當我使用它告訴我,函數doenst存在?還有其他人有這個問題嗎?

public function checkTitle() { 
    $title = $this->html->find('title',0)->innertext; 
    $test = imagettfbbox(18, 0, 'arial.tff', $title); 
} 

錯誤: 調用未定義功能應用\ HTTP \控制器\ imagettfbbox()

希望有人能想出解決辦法? :)

  • 感謝
+1

你的php安裝中包含['freetype support'](https://secure.php.net/manual/en/function.imagettfbbox.php#refsect1-function.imagettfbbox-notes)? – Jerodev

+0

GD支持在我的phpinfo中啓用 –

回答

0

注意的GD安裝但不FreeType的:)感謝您的幫助。