杭州神话信息技术有限公司

标题: '上载的图片文件不是有效的图片文件' 解决方法 [打印本页]

作者: baobao1982    时间: 2011-8-11 01:31:06     标题: '上载的图片文件不是有效的图片文件' 解决方法


文件地址:include/lib/upload.han.php


  1. else {
  2.             if(false == in_array($this->_ext, $this->_image_types))
  3.             {
  4.                 $this->_setError(507);
  5.                 return false;
  6.             }

  7.             if(function_exists('exif_imagetype') && !exif_imagetype($temp)) {
  8.                                  $this->_setError(507);
  9.                  return false;
  10.                         } elseif (function_exists('getimagesize') && !getimagesize($temp)) {
  11.                                 $this->_setError(507);
  12.                  return false;
  13.                         }           
  14.         }
复制代码

用上面的代码替换成以下代码(或者自己对上面的代码做闭屏处理)

  1. //       else {
  2. //            if(false == in_array($this->_ext, $this->_image_types))
  3. //            {
  4. //                $this->_setError(507);
  5. //                return false;
  6. //            }
  7. //
  8. //            if(function_exists('exif_imagetype') && !exif_imagetype($temp)) {
  9. //                                 $this->_setError(507);
  10. //                 return false;
  11. //                        } elseif (function_exists('getimagesize') && !getimagesize($temp)) {
  12. //                                $this->_setError(507);
  13. //                 return false;
  14. //                        }           
  15. //        }
复制代码

作者: jishigou_vip    时间: 2011-8-11 10:52:04



收到
作者: q549224525    时间: 2011-8-11 11:22:32

先顶一下!!!!!!!!!!!
作者: czccy    时间: 2011-8-11 16:30:32

我最近也出現這個問題   = =|不知道怎麼回事哇,我最近沒修改怎麼。。前幾天還正常的
作者: wwtnet    时间: 2011-8-11 16:43:34

这个不错,应该支持,解决了图片问题
作者: iorili    时间: 2011-8-12 12:18:05

支持一下~~~




欢迎光临 杭州神话信息技术有限公司 (http://www.cenwor.com/) Powered by Discuz! X2