From ce65756874bc5dab86a3141a7b563d3919f1f347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=80=E6=9C=AF=E8=80=81=E8=83=A1?= <1094551889@qq.com> Date: Thu, 5 Sep 2024 11:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=97=B6=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/IndexController.php | 4 ++++ app/controller/PayController.php | 2 +- extend/payclient/ShouQianBa.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controller/IndexController.php b/app/controller/IndexController.php index c217f67..53a5cd0 100644 --- a/app/controller/IndexController.php +++ b/app/controller/IndexController.php @@ -14,4 +14,8 @@ class IndexController } return View::fetch(); } + public function test() + { + return runtime_path(); + } } diff --git a/app/controller/PayController.php b/app/controller/PayController.php index 67f6bdf..7520a88 100644 --- a/app/controller/PayController.php +++ b/app/controller/PayController.php @@ -280,7 +280,7 @@ class PayController return '参数错误'; } $is_user = User::checkUser($pid, $sign); - $path = '../runtime/order.json'; + $path = runtime_path() . 'order.json'; if ($is_user) { $orders = Order::scope('activeOrder')->field('id,pid,aid,cid,patt')->select(); if (!file_exists($path)) { diff --git a/extend/payclient/ShouQianBa.php b/extend/payclient/ShouQianBa.php index c7f1f2e..42b8c99 100644 --- a/extend/payclient/ShouQianBa.php +++ b/extend/payclient/ShouQianBa.php @@ -17,7 +17,7 @@ class ShouQianBa $this->username = $config['username']; $this->password = $config['password']; // 检查token目录 - $dir_path = '../runtime/token/shouqianba'; + $dir_path = runtime_path() . 'token/shouqianba'; if (!is_dir($dir_path)) { if (!mkdir($dir_path, 755, true)) { echo '目录创建失败';