From 4b10bf3cba298cf11b1ecba804ec6cf78a4b28e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Mon, 27 Oct 2025 15:49:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Page.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/api/controller/Page.php b/application/api/controller/Page.php index 0cbb086..8c5bb9f 100644 --- a/application/api/controller/Page.php +++ b/application/api/controller/Page.php @@ -33,7 +33,12 @@ class Page extends controller { $id = input('id', ''); $reslut = model('Page')->get_page($id); - $html = $reslut['content'] ? $reslut['content'] : ''; + if($reslut){ + $html = $reslut['content'] ??''; + }else{ + $html = ''; + } + //解析html $html = htmlspecialchars_decode($html); return $html;