diff --git a/themes/tajian/controller/FrontapiController.php b/themes/tajian/controller/FrontapiController.php index e0a2fe9..c96dc61 100644 --- a/themes/tajian/controller/FrontapiController.php +++ b/themes/tajian/controller/FrontapiController.php @@ -150,8 +150,7 @@ Class FrontApiController extends SiteController { //保存分享视频到任务文件 protected function saveBotTask($url) { - $task_dir = realpath(__DIR__ . '/../../../runtime/' - . FSC::$app['config']['tajian']['task_dir']); + $task_dir = __DIR__ . '/../../../runtime/' . FSC::$app['config']['tajian']['task_dir']; if (!is_dir($task_dir)) { mkdir($task_dir, 0755, true); } @@ -164,9 +163,7 @@ Class FrontApiController extends SiteController { //保存分享视频到tag分类 //TODO: 如果高并发,需要避免数据被覆盖的问题 protected function saveVideoToTag($url, $tagName) { - $tag_dir = realpath(__DIR__ . '/../../../www/' - . FSC::$app['config']['content_directory'] - . '/' . FSC::$app['config']['tajian']['tag_dir']); + $tag_dir = __DIR__ . '/../../../www/' . FSC::$app['config']['content_directory'] . '/' . FSC::$app['config']['tajian']['tag_dir']; if (!is_dir($tag_dir)) { mkdir($tag_dir, 0755, true); } @@ -193,7 +190,7 @@ Class FrontApiController extends SiteController { protected function sign($params, $token) { //对参数做MD5签名 ksort($params); - return md5( json_encode($params, JSON_UNESCAPED_SLASHES) . $token ); + return md5( json_encode($params, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) . $token ); } //提交视频抓取任务到HeroUnion英雄联盟 @@ -223,8 +220,7 @@ Class FrontApiController extends SiteController { //保存快捷方式 protected function saveUrlShortCut($task_id, $task_url) { - $data_dir = realpath(__DIR__ . '/../../../runtime/' - . FSC::$app['config']['tajian']['data_dir']); + $data_dir = __DIR__ . '/../../../runtime/' . FSC::$app['config']['tajian']['data_dir']; if (!is_dir($data_dir)) { mkdir($data_dir, 0755, true); } @@ -244,8 +240,7 @@ eof; //保存描述文件:标题和图片 protected function saveDescriptionFiles($task_id, $task_data) { - $data_dir = realpath(__DIR__ . '/../../../runtime/' - . FSC::$app['config']['tajian']['data_dir']); + $data_dir = __DIR__ . '/../../../runtime/' . FSC::$app['config']['tajian']['data_dir']; if (!is_dir($data_dir)) { mkdir($data_dir, 0755, true); }