首页  >  文章  >  后端开发  >  使用GD2函数在照片上添加文字出现异常

使用GD2函数在照片上添加文字出现异常

WBOY
WBOY原创
2016-06-13 12:20:201604浏览

使用GD2函数在照片上添加文字出现错误~
出现这样的错误怎么解决啊,试了好多办法都不行。!



Warning:  imagecreatefromjpeg(/images/photo.jpg): failed to open stream: No such file or directory in C:\Apache24\htdocs\Excerse\index.php on line 3



Warning:  imagecolorallocate() expects parameter 1 to be resource, boolean given in C:\Apache24\htdocs\Excerse\index.php on line 4



Warning:  imagettftext() expects parameter 1 to be resource, boolean given in C:\Apache24\htdocs\Excerse\index.php on line 7



Warning:  imagejpeg() expects parameter 1 to be resource, boolean given in C:\Apache24\htdocs\Excerse\index.php on line 8



Warning:  imagedestroy() expects parameter 1 to be resource, boolean given in C:\Apache24\htdocs\Excerse\index.php on line 9

------解决思路----------------------
Warning: imagecreatefromjpeg(/images/photo.jpg): failed to open stream: No such file or directory in C:\Apache24\htdocs\Excerse\index.php on line 3

failed to open stream: No such file or directory 打开失败:没有这样的文件或目录

------解决思路----------------------
提示图片不存在,获取不到图片资源,接下来都报错了
检查下文件路径
------解决思路----------------------
用IDE运行会有偏差的,还是用浏览器运行吧。浏览器运行没问题就行。

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
上一篇:,smarty循环不显示下一篇:php缺标签