Call to undefined function imagecreatefromjpeg()
2017-09-14 20:25
731 查看
近日发现标题上的问题,特此总结下:
imagecreatefromjpeg函数是一个图像处理函数,在项目开发中做图片上传、缩略图时,在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会提示Call to undefined function imagecreate()错误。
发现线上环境的phpinfo为
少了JPEG Support
本地的本地wamp环境的phpinfo为
需重新编译,加上–with-jpeg-dir,可参考本博客lnmp环境安装
make
make install
重新打开线上的phpinfo
imagecreatefromjpeg函数是一个图像处理函数,在项目开发中做图片上传、缩略图时,在php中imagecreate函数是一个图形处理函数,主要用于新建一个基于调色板的图像了,然后在这个基础上我们可以创建一些图形数字字符之类的,但这个函数需要GD库支持,如果没有开启GD库使用时会提示Call to undefined function imagecreate()错误。
[root@iZwz96pb4qob9lpzadqipkZ ~]# php -r "var_dump(function_exists('imagecreatefromjpeg'));" bool(false)
发现线上环境的phpinfo为
少了JPEG Support
本地的本地wamp环境的phpinfo为
需重新编译,加上–with-jpeg-dir,可参考本博客lnmp环境安装
make
make install
重新打开线上的phpinfo
相关文章推荐
- php Fatal error: Call to undefined function imagecreatefromjpeg()
- Call to undefined function imagecreatefromjpeg() in
- thinkphp open,Call to undefined function imagecreatefromjpeg()
- 解决:Call to undefined function imagecreatefromjpeg;JPEG Support enabled却不成正常压缩裁剪jpeg图片
- ThinkPHP 遇到Call to undefined function ImageCreateFrombmp() 问题解决
- PHP error: Call to undefined function imagecreate()的解决办法
- php提示Fatal error: Call to undefined function imagecreate()
- ThinkPHP Call to undefined function Think\imagecreate解决
- php报错 ----> Call to undefined function imagecreatetruecolor()
- Call to undefined function imagecreate()
- PHP错误:call to undefined function imagecreatetruecolor
- Fatal error: Call to undefined function imagecreatetruecolor() in
- PHP发生Call to undefined function imagecreate()错误的解决办法
- undefined function imagecreatefromjpeg()
- Call to undefined function imagecreatetruecolor() imageCreate() 的gd库解决办法
- Call to undefined function ImageCreate()错误解决 扩展gd库
- error: Call to undefined function imagecreate()的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- PHP发生Call to undefined function imagecreate()错误的解决办法
- php提示Fatal error: Call to undefined function imagecreate()