From 4253a2e7d771feee17d4b50cfdb4093a82d8d4d2 Mon Sep 17 00:00:00 2001 From: suyi Date: Tue, 2 Apr 2024 12:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app/functions.php b/server/app/functions.php index 2cac4a1..c08c5f6 100644 --- a/server/app/functions.php +++ b/server/app/functions.php @@ -444,7 +444,7 @@ if (!function_exists('download_file')) { if (!file_exists($saveDir)) { mkdir($saveDir, 0775, true); } - $fileSrc = $saveDir . $fileName; + $fileSrc = public_path()."/".$saveDir . $fileName; file_exists($fileSrc) && unlink($fileSrc); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); @@ -459,7 +459,7 @@ if (!function_exists('download_file')) { unlink($fileSrc); return ''; } - return $fileSrc; + return $saveDir . $fileName; } } -- Gitee