正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -372,12 +372,12 @@ class ImageController extends Controller | @@ -372,12 +372,12 @@ class ImageController extends Controller | ||
| 372 | if($settingInfo['status'] == 1 && !empty($settingInfo['image_data'])){ | 372 | if($settingInfo['status'] == 1 && !empty($settingInfo['image_data'])){ |
| 373 | $image_data = json_decode($settingInfo['image_data'],true); | 373 | $image_data = json_decode($settingInfo['image_data'],true); |
| 374 | foreach ($image_data as $k => $v){ | 374 | foreach ($image_data as $k => $v){ |
| 375 | - $arr = implode('/',$v); | ||
| 376 | - if ($arr[0] == 'image') { | ||
| 377 | - $arr[1] = urlSafeBase64Encode($arr[1]); | 375 | + if (str_starts_with($v, "image/")) { |
| 376 | + $v = 'image/'.urlSafeBase64Encode(substr($v, strlen("image/"))); | ||
| 378 | } | 377 | } |
| 379 | - $image_data[$k] = $arr; | 378 | + $image_data[$k] = $v; |
| 380 | } | 379 | } |
| 380 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export($image_data, true) . PHP_EOL, FILE_APPEND); | ||
| 381 | return $image_data; | 381 | return $image_data; |
| 382 | } | 382 | } |
| 383 | if($settingInfo['status'] == 2 && !empty($settingInfo['str_data'])){ | 383 | if($settingInfo['status'] == 2 && !empty($settingInfo['str_data'])){ |
-
请 注册 或 登录 后发表评论