php安装gd库以后,在生成验证码图片的时候报错Call to undefined function think\captcha\imagettftext(),查阅资料(参考资料:http://www.shangzh.com/1094.html)可能是因为gd库缺失freetype支持,然后查找下载资源:https://download.savannah.gnu.org/releases/freetype/,下载安装(位置:/usr/local/freetype),然后重新安装gd,configure时添加指定额外参数--with-freetype-dir=/usr/local/freetype,安装完后重启php即可,验证码生成正常。
Call to undefined function think\captcha\imagettftext()
最新推荐文章于 2021-11-29 10:07:25 发布