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;