修复特殊文件名 获取图片失败的bug

This commit is contained in:
zyx0814
2024-02-07 00:26:02 +08:00
Unverified
parent 457d8c2254
commit 04f5a34c3e

View File

@@ -40,14 +40,13 @@ if ($appdata['type'] == 0) {//eagle缩略图
else{
//否则尝试使用小图作为大图地址展示
$tmppath = str_replace(strrchr($patharr['path'], "."), "", $patharr['path']);
$tmppath = preg_replace('/\.'.$ext.'$/','',$patharr['path']);
$thumbpath = $thumbdir . BS . $tmppath . '_thumbnail.png';
//如果小图也不存在,使用图标代替大图
if (!$patharr['hasthumb'])$thumbpath = 'static/dzzthumb/preview/b.gif';
}
}else{//小图时
$patharr['path'] = DB::result_first("select path from %t where rid = %s",array('pichome_resources_attr',$patharr['rid']));
$tmppath = str_replace(strrchr($patharr['path'], "."), "", $patharr['path']);
$tmppath = preg_replace('/\.'.$ext.'$/','',$patharr['path']);
$thumbpath = ($iscloud) ? IO::getFileUri($thumbdir . BS . $tmppath . '_thumbnail.png'):$thumbdir . BS . $tmppath . '_thumbnail.png';
//如果小图不存在
if (!$patharr['hasthumb']){
@@ -57,6 +56,7 @@ if ($appdata['type'] == 0) {//eagle缩略图
}
}
}
elseif($appdata['type'] == 2) {//billfish缩略图
//获取记录表缩略图对应信息