tp5与页面链接


        $arr = [
            'id' => 10,
            'name' => '标题'
        ];
        $this->assign('a', $arr);

        $t = time();
        $this->assign('t', $t);

        $isok = 'ture';
        $this->assign('isok', $isok);

      


        return $this->fetch();
    }
    public function console()
    {
        $list = db('teams')->select();
        $this->assign('list', $list);
        return $this->fetch();
    }

    public function addproduct()
    {
        if (request()->isPost()) {
            $post = input('post.');
            db('new')->insert($post);
        }

        // 类型添加
        // $list = db('leixing')->select();
        // $this->assign('list',$list);
        return $this->fetch();
    }
原文地址:https://www.cnblogs.com/mark645524126/p/13685442.html