
这里有个BUG,上传的压缩包文件无法被读取
- 解决方法
打开/dede/file_class.php文件
找到
else if(substr($filename, -strlen($fileexp))===$fileexp)
改成
else if(preg_match("/\.(".$fileexp.")$/", $filename))
保存后,重新选择压缩包提交就可以了。
- 自动获取压缩包里图片的名称
打开/dede/album_add.php文件
找到
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n";
改成
$imginfo = gb2utf8(basename(substr($imgold, 0, strrpos($imgold, "."))));$imgurls .= "{dede:img ddimg='$litpicname' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n";
- 效果
