view->fetch(); } /** * 将用户协议伪装为静态文本 * @param string $name * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException * @author fuyelk * @date 2021/07/05 19:40 */ public function agreement($name = '') { if (empty($name)) { echo ""; exit(); } $data = db('text')->field('desc,text')->where('title', $name)->where('public', 1)->find(); if (empty($data)) { echo ""; exit(); } $html = <<{$data['desc']}{$data['text']} EOF; echo $html; } }