有一位站长朋友找到这篇Dedecms文章:如何处理织梦DEDECMS网站后台无法上传图片的步骤详解,按照上面的方法进行处理,还是无解,于是小编 打开这个文件进行代码分析,结果发现这样的方法解决了根本,但是站长朋友说当上传还是失败,无忧主机小编也测试了还是不行,所以百度了很长时间,终于知道这些问题是怎么发生的了,于是小编就整理出这篇的文章的完结篇,思路步骤如下。(步骤不分先后只要解决问题即可)第一步:排除php虚拟主机文件写入权限问题(问题无法解决往下看) 第二步:文本编辑器(editplus)打开文件目录:/include/uploadsafe.inc.php(问题无法解决往下看) 查找:(大致在45行)
$imtypes = array ( "image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/bmp", 修改为: $imgtypes = array ( "image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/bmp", 注意:(修改完上传后更新缓存) 第三步:文本编辑器(editplus)打开文件目录:/include/uploadsafe.inc.php 查找:(大致在47行至48行)
$imtypes = array ( "image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/bmp", 修改为:
$imtypes = array ( "image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/bmp",“image/jpg”,
文章来源:黎青松SEO博客
来源地址:http://www.alitaohuo.com/CMSjiaocheng/zhimengjiaocheng/2044.html