正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
| @@ -56,6 +56,12 @@ class ImageController | @@ -56,6 +56,12 @@ class ImageController | ||
| 56 | exit; | 56 | exit; |
| 57 | } | 57 | } |
| 58 | $imageModel = new ImageModel(); | 58 | $imageModel = new ImageModel(); |
| 59 | + $dotIndex = strpos($hash, '.'); | ||
| 60 | + if ($dotIndex !== false) { | ||
| 61 | + $hash = substr($dotIndex, 0, $dotIndex); // 删除小数点及其后面的字符 | ||
| 62 | + } | ||
| 63 | + var_dump($hash); | ||
| 64 | + die(); | ||
| 59 | $info = $imageModel->read(['hash'=>$hash]); | 65 | $info = $imageModel->read(['hash'=>$hash]); |
| 60 | if ($info === false) { | 66 | if ($info === false) { |
| 61 | $this->response('指定图片不存在!', Code::USER_ERROR); | 67 | $this->response('指定图片不存在!', Code::USER_ERROR); |
-
请 注册 或 登录 后发表评论