From eeb348c053cc5f46fb6725e52791dba289a3d2a1 Mon Sep 17 00:00:00 2001 From: whwyy Date: Fri, 2 Jan 2026 04:51:16 +0800 Subject: [PATCH] eee --- function.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/function.php b/function.php index 8d17bcea..c887e49c 100644 --- a/function.php +++ b/function.php @@ -702,7 +702,9 @@ if (!function_exists('storage')) { */ function storage(?string $fileName = '', ?string $path = ''): string { - + if (!str_ends_with($path, '/')) { + $path .= '/'; + } $basePath = rtrim(Kiri::getStoragePath(), '/'); if (!empty($path)) { $path = ltrim($path, '/'); @@ -1010,7 +1012,7 @@ if (!function_exists('json_log')) { ]; $param['data'] = $data; - file_put_contents(storage('/exception-' . date('Y-m-d') . '.log','exception'), + file_put_contents(storage('exception-' . date('Y-m-d') . '.log','exception'), json_encode($param, JSON_UNESCAPED_UNICODE), FILE_APPEND); }