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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                該主題支持參考 [ThinkPHP3.2 - 模板主題](http://document.thinkphp.cn/manual_3_2.html#template_theme),因很多網友呼吁,官方仍未推出支持模板主題的更新,我自己修改代碼,完美支持主題 >[info]tpadmin管理后臺并未主動使用模板主題,無論是否修改代碼支持模板主題,都不會影響管理后臺正常運行 ##使用方法 在控制器里模板輸出時加上theme方法: ``` // 繼承 \think\Controller 控制器時 return $this->theme('blue')->fetch(); // 或者 $this->theme('blue')->display(); // 沒有繼承 \think\Controller 控制器時 $view = \think\View(); return $view->theme('blue')->fetch(); // 或者 $view->theme('blue')->display(); // 全局設置默認模板主題 // 在 config.php 配置文件里加上 'template' => [ // 默認主題 'default_theme' => 'blue' ], ``` >[info]主題為空時表示不使用主題,不使用主題時view模板文件路徑和以前一樣,例如AdminGroup的模板文件在view/admin_group/*,使用blue主題時,模板文件在view/blue/admin_group/*,使用red主題時,模板文件在view/red/admin_group/* ##官方代碼修改 >[warning]如果介意修改官方源碼或者沒有必要使用模板主題,最好不要改動官方源碼,改了之后一定要做標記,否則下次升級可能會出現嚴重問題 >[danger]thinkphp/library/think/Controller.php 第 147 行: ``` /** * 設置模板主題 * tianpian <tianpian0805@gmail.com> * @access protected * @param string $theme * @return $this */ protected function theme($theme = '') { $this->view->theme($theme); return $this; } ``` >[danger]thinkphp/library/think/View.php 第 171 行: ``` /** * 設置模板主題 * tianpian <tianpian0805@gmail.com> * @access public * @param string $theme 主題名稱 * @return $this */ public function theme($theme = '') { $this->config('default_theme', $theme); return $this; } ``` >[danger] thinkphp/library/think/view/driver/Think.php 第 35 行和第 131 行:(如果使用其他模板引擎驅動,請參照該文件修改) ``` // 第35行 // 模板主題 tianpian <tianpian0805@gmail.com> 'default_theme' => '', // 第131行: // 模板主題 tianpian <tianpian0805@gmail.com> if ($this->config['default_theme']) { $template = $this->config['default_theme'] . DS . $template; } ```
                  <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>

                              哎呀哎呀视频在线观看