From 82db3d35fb1f9bd46be24d958154504912b0e15d Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Sat, 20 Apr 2024 16:03:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/IndexController.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/controller/IndexController.php b/app/controller/IndexController.php index 4ec0f42..6adac3a 100644 --- a/app/controller/IndexController.php +++ b/app/controller/IndexController.php @@ -3,12 +3,12 @@ namespace app\controller; use support\Request; -use support\Db; use app\result\Result; use Carbon\Carbon; use app\model\Timetable; use support\Log; +use Curl\Curl; class IndexController { public function index(Request $request) @@ -18,6 +18,7 @@ class IndexController $readme = '700'; // $readme = file_get_contents(base_path('README.md')); } + Log::info('log test'); return $readme; } @@ -56,7 +57,15 @@ class IndexController } return Result::show(200,'ok',''); } - public function send_msg($title, $body) + public function send_msg($title='', $body='') { + $brak_key=''; + $curl = new Curl(); + $curl->get('https://www.example.com/'.$title.'/'.$body); + if ($curl->error) { + $curl->diagnose(); + Log::info('消息发送失败', $curl->errorMessage); + } + return Result::show(200,'ok',''); } }