From fbd08a3b3ade1fa1d5ba0317bd7f47ca4caff54c Mon Sep 17 00:00:00 2001 From: filesite Date: Sun, 14 Apr 2024 00:33:10 +0800 Subject: [PATCH] bug fix: wrong path of task data --- themes/tajian/controller/FrontapiController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/themes/tajian/controller/FrontapiController.php b/themes/tajian/controller/FrontapiController.php index 80e079e..4521f8c 100644 --- a/themes/tajian/controller/FrontapiController.php +++ b/themes/tajian/controller/FrontapiController.php @@ -220,7 +220,7 @@ Class FrontApiController extends SiteController { //保存快捷方式 protected function saveUrlShortCut($video_id, $task_url) { - $data_dir = __DIR__ . '/../../../runtime/' . FSC::$app['config']['tajian']['data_dir']; + $data_dir = __DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'] . '/' . FSC::$app['config']['tajian']['data_dir']; if (!is_dir($data_dir)) { mkdir($data_dir, 0755, true); } @@ -240,7 +240,7 @@ eof; //保存描述文件:标题和图片 protected function saveDescriptionFiles($video_id, $task_data) { - $data_dir = __DIR__ . '/../../../runtime/' . FSC::$app['config']['tajian']['data_dir']; + $data_dir = __DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'] . '/' . FSC::$app['config']['tajian']['data_dir']; if (!is_dir($data_dir)) { mkdir($data_dir, 0755, true); } @@ -254,13 +254,13 @@ eof; //保存图片文件 if (!empty($task_data['cover_base64'])) { - $filepath_cover ="{$data_dir}/{$video_id}.{$task_data['cover_type']}"; + $filepath_cover = "{$data_dir}/{$video_id}.{$task_data['cover_type']}"; file_put_contents($filepath_cover, $task_data['cover_base64']); - $filepath_desc ="{$data_dir}/{$video_id}_cover.txt"; + $filepath_desc = "{$data_dir}/{$video_id}_cover.txt"; file_put_contents($filepath_desc, "{$video_id}.{$task_data['cover_type']}"); }else if (!empty($task_data['cover'])) { - $filepath_desc ="{$data_dir}/{$video_id}_cover.txt"; + $filepath_desc = "{$data_dir}/{$video_id}_cover.txt"; file_put_contents($filepath_desc, "{$task_data['cover']}"); } }catch(Exception $err) {