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 '目录创建失败';