PHP新手请教:getimagesize不能获取远程图片信息!??急

BigNippleBoy 2012-10-26 09:34:29
各位前辈,我在本地用getimagesize很正常,但程序在虚拟主机上就会报错,请问有经验指点一下!


[26-Oct-2012 12:27:07] PHP Warning: getimagesize() [<a href='function.getimagesize'>function.getimagesize</a>]: php_network_getaddresses: gethostbyname failed. errno=2 in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 7

[26-Oct-2012 12:27:07] PHP Warning: getimagesize(http://m1.img.libdd.com/farm5/2012/1007/20/C8424A3B37D62296C6F03590A38FB038E3EF04218A0A_750_1128.jpg) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: php_network_getaddresses: gethostbyname failed. errno=2 in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 7

[26-Oct-2012 12:27:07] PHP Warning: Division by zero in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 29

[26-Oct-2012 12:27:07] PHP Warning: imagecreatetruecolor() [<a href='function.imagecreatetruecolor'>function.imagecreatetruecolor</a>]: Invalid image dimensions in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 30

[26-Oct-2012 12:27:07] PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 31

[26-Oct-2012 12:27:07] PHP Warning: imagejpeg(): supplied argument is not a valid Image resource in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 33

[26-Oct-2012 12:27:07] PHP Warning: imagedestroy(): supplied argument is not a valid Image resource in D:\freehost\bignippleboy\web\bignippleboy\wp-content\plugins\wp-img\wp-resize.php on line 34
...全文
651 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
BigNippleBoy 2012-10-27
  • 打赏
  • 举报
回复
那是否有代替的方式?
acabin 2012-10-27
  • 打赏
  • 举报
回复
自己写socket咯
acabin 2012-10-26
  • 打赏
  • 举报
回复
gethostbyname failed
看来是你服务器不支持解析dns
一起混吧 2012-10-26
  • 打赏
  • 举报
回复
虚拟主机禁用 getimagesize 函数?

21,881

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧