织梦无法上传ico图标格式文件的解决方法
织梦默认只允许上传 jpg,gif,png 格式的图片文件,如果想要上传ico图标格式文件或者其他格式图片文件需要做如下几步
1.后台-系统-系统基本参数-附件设置-图片浏览器文件类型
添加
|ico
如图,注意有个 | 竖线
2.打开 /include/dialog/select_images_post.php 找到 大概在44行 $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/xicon"); 3.打开 /include/dialog/select_images.php 找到 大概在193行 else if(preg_match("#\.(gif|png)#i", $file)) 改成 else if(preg_match("#\.(gif|png|ico)#i", $file)) 完成
2.打开 /include/dialog/select_images_post.php 找到 大概在44行 $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/xicon"); 3.打开 /include/dialog/select_images.php 找到 大概在193行 else if(preg_match("#\.(gif|png)#i", $file)) 改成 else if(preg_match("#\.(gif|png|ico)#i", $file)) 完成