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',''); } }