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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 使用模板引擎 默認情況下,Yii 使用 PHP 作為其默認的模板引擎語言,但是,你可以配置 Yii 以擴展的方式支持其他的渲染引擎,比如?[Twig](http://twig.sensiolabs.org/)?或[Smarty](http://www.smarty.net/)等。 組件?`view`?就是用于渲染視圖的。你可以重新配置這個組件的行為以增加一個自定義的模板引擎。 ~~~ [ 'components' => [ 'view' => [ 'class' => 'yii\web\View', 'renderers' => [ 'tpl' => [ 'class' => 'yii\smarty\ViewRenderer', //'cachePath' => '@runtime/Smarty/cache', ], 'twig' => [ 'class' => 'yii\twig\ViewRenderer', 'cachePath' => '@runtime/Twig/cache', // Array of twig options: 'options' => [ 'auto_reload' => true, ], 'globals' => ['html' => '\yii\helpers\Html'], 'uses' => ['yii\bootstrap'], ], // ... ], ], ], ] ~~~ 在上述的代碼中, Smarty 和 Twig 都被配置以讓視圖文件使用。但是,為了讓擴展安裝到項目中,你同樣需要修改你的`composer.json`?文件,如下: ~~~ "yiisoft/yii2-smarty": "*", "yiisoft/yii2-twig": "*", ~~~ 上述代碼需要增加到?`composer.json`?的?`require`?節中。在做了上述修改,并保存后,你可以運行?`composer update --prefer-dist`?命令來安裝擴展。 對于特定模板引擎的使用詳細,請參考其文檔: * [Twig guide](https://github.com/yiisoft/yii2-twig/tree/master/docs/guide) * [Smarty guide](https://github.com/yiisoft/yii2-smarty/tree/master/docs/guide)
                  <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>

                              哎呀哎呀视频在线观看