让dedecms后台支持上传bmp格式的图片

后台-系统-附件设置,里面添加了bmp,上传bmp格式图片系统还是会提示你“文件类型不正确!”,那么有什么好的解决方法呢,请看下文。

1、后台-系统-附件设置,添加bmp

让dedecms后台支持上传bmp格式的图片

2、\include\dialog\select_images_post.php 找到

$sparr = Array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp");  

改成

$sparr = Array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp", "image/bmp");  

3、\include\helpers\upload.helper.php 找到

$sparr = Array('image/pjpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/xpng', 'image/wbmp');  

改成

$sparr = Array('image/pjpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/xpng', 'image/wbmp', 'image/bmp');  

4、\include\dialog\select_images.php 找到

(gif|png)  

改成

(gif|png|bmp)  

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/97094e4920cda86a0c4b9537ed38733d.html