织梦无法上传图片的真实原因

COS、CDN
  • 解决方法
    • 打开 /include/uploadsafe.inc.php 文件,找到以下代码:
      $imtypes = array("image/pjpeg","image/jpeg","image/gif","image/png","image/xpng","image/wbmp","image/bmp"); if(in_array(strtolower(trim(${$_key.'_type'})),$imtypes)){     $image_dd = @getimagesize($$_key);     if (!is_array($image_dd)){         exit('Upload filetype not allow !');     } }
    • 修改为:
      $imgtypes = array("image/pjpeg","image/jpeg","image/gif","image/png","image/xpng","image/wbmp","image/bmp"); if(in_array(strtolower(trim(${$_key.'_type'})),$imgtypes)){     $image_dd = @getimagesize($$_key);     if (!is_array($image_dd)){         exit('Upload filetype not allow !');     } }

       

COS、CDN
热门