我一直在此处在我的网站上的图像上创建水印.从上个月开始,此脚本正在处理的图像未显示.我在Firebug控制台中收到以下错误.
I have been using the Watermark script used here for creating water mark on image on my site. From last month the images that are being process by this script are not showing. I get the following error in firebug console.
Image corrupt or truncated: www.mysite/data/10.jpg在查看服务器的错误日志时,我在这里有这行
Looking at the error log for server i have this line there
PHP Warning: imagejpeg(): Filename cannot be empty in /home/mysite/public_html/data/watermark.php on line 80请建议问题出在哪里.我检查了显示GD库已启用的服务器信息.
Please suggest where the issue is. I checked server info which shows GD library is enabled.
PS:这在我的本地服务器上正常运行.我在本地和在线5.4.19上都有PHP版本5.3.1.
PS: This is working correctly on my local server. I have PHP Version 5.3.1 on local and 5.4.19 Online.
推荐答案弄清楚了这一点.这是PHP版本的问题.
Figured this Out. It was an issue with PHP version.
在PHP 5.3
imagejpeg($image, '', 100);在 5.4
imagejpeg($image, NULL, 100);希望这会对某人有所帮助.
Hope this would help someone.
更多推荐
PHP水印脚本使用GD库函数imagejpeg错误
发布评论