SEO学院

大理石构件

thinkphp 前台输出

<?php
 
 
namespace app\index\controller;
 
use think\Controller;
use think\facade\View;
class Demo7 extends Controller
{
    public function test1()
    {
        $content="<h3>nishi</h3>";
        //return $this->view->display($content);
        return View::display($content);
    }
    public function test2()
    {
        $this->view->assign('title', '98');
        $obj = new  \stdClass();
        $obj->name="PHP";
 
        $this->view->assign('obj',$obj);
 
        return $this->view->fetch();
    }
 
    public  function test3()
    {
      $data =  \app\model\Daohang::all();
      $this->view->assign('data',$data);
      return $this->view->fetch();
    }
    public function test4()
    {
        $data = \app\model\Daohang::paginate(3);
        $this->view->assign('data',$data);
        return $this->view->fetch();
    }
}

 https://www.cnblogs.com/furuihua/p/13646263.html

posted @ 2020-09-14 17:39  cute12  阅读(164)  评论(0编辑  收藏  举报

PHP知识网

眯起了导航网

大理石平台