<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 模板賦值 模板中的變量(除了一些系統變量外)必須先進行模板賦值后才能使用,可以使用`assign`方法進行全局模板變量賦值。 ~~~ namespace app\controller; use think\facade\View; class Index { public function index() { // 模板變量賦值 View::assign('name','ThinkPHP'); View::assign('email','thinkphp@qq.com'); // 或者批量賦值 View::assign([ 'name' => 'ThinkPHP', 'email' => 'thinkphp@qq.com' ]); // 模板輸出 return View::fetch('index'); } } ~~~ `assign`方法賦值屬于全局變量賦值,如果你需要單次賦值的話,可以直接在`fetch`方法中傳入。 ~~~ namespace app\controller; use think\facade\View; class Index { public function index() { // 模板輸出并變量賦值 return View::fetch('index', [ 'name' => 'ThinkPHP', 'email' => 'thinkphp@qq.com' ]); } } ~~~ ### 助手函數 如果使用`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>

                              哎呀哎呀视频在线观看