入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

PHP图片裁剪之获取图片大小getimagesize

创建时间:2010-08-24 投稿人: 浏览次数:155

在网上下了一个图片裁剪的插件jquery.cropzoom.min.js,功能非常的强大,而且还帮我准备了一个php的动态脚本,不费多少功夫就搭好了。而且跑起来挺不错的。裁剪+旋转图片,一键即可。

 

一开始没什么问题,后来修改时,就出现了一个莫名的错误。详细的描述如下:

 

××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××

Warning: getimagesize(http://localhost/cms/uploadfiles/2010/08/24/133934.jpg) [function.getimagesize]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in D:/AppServ/www/cms/test/test.php on line 3

Fatal error: Maximum execution time of 30 seconds exceeded in D:/AppServ/www/cms/test/test.php on line 3

××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××

 

看到这个错误,我就想是不是getimagesize需要服务器配置什么,因为在家里是行的,我立刻debug了一下:

 

结果显示挺正常的

X-Powered-By: PHP/5.2.10 ZendServer

Set-Cookie: ZendDebuggerCookie=127.0.0.1%3A10137%3A0||084|77742D65|1003; path=/

Content-type: text/html

 

array(7) {

  [0]=>

  int(800)

  [1]=>

  int(533)

  [2]=>

  int(2)

  [3]=>

  string(24) "width="800" height="533""

  ["bits"]=>

  int(8)

  ["channels"]=>

  int(3)

  ["mime"]=>

  string(10) "image/jpeg"

}

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像