<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                > ## 繼承\think\Controller類 ``` class Index extends \think\Controller { public function index() { 方法一:模板渲染與模板賦值分離 // 模板變量賦值 $this->assign('email','thinkphp@qq.com'); // 批量賦值 $this->assign([ 'name' => 'ThinkPHP', 'email' => 'thinkphp@qq.com' ]); // 模板輸出 return $this->fetch('index'); // 模板渲染規則(默認的模板后綴為html,如果不是html,渲染的時候帶上后綴即可) // 當前模塊/當前控制器/當前方法 return $this->fetch(); // 當前模塊/當前控制器/edit return $this->fetch('edit'); // 當前模塊/member/read return $this->fetch('member/read'); // admin/member/edit return $this->fetch('admin@member/edit'); // 當前模塊/public/menu (即便沒有public控制器也是可以的) return $this->fetch('public/menu'); // 支持從視圖根目錄開始讀取模板(當前模塊/默認視圖目錄/menu.html) $this->fetch('/menu'); 方法二:模板渲染與模板賦值同時進行 return $this->fetch('index', [ 'name' => 'ThinkPHP', 'email' => 'thinkphp@qq.com' ]); } } ``` > ## 助手函數(不需要繼承Controller基類)**`|最簡單的方式|`** > ### view(['模板文件'],['模板變量(數組)'],[模板輸出替換(數組)]) ``` return view('index', [ 'name' => 'ThinkPHP', 'email' => 'thinkphp@qq.com' ]); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看