使用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运行会有偏差的,还是用浏览器运行吧。浏览器运行没问题就行。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号