<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 功能強大 支持多語言、二開方便! 廣告
                >[danger] 部署方案三簡介 + TP6.0.3 多應用模式 + layuiadminv1.4.0 單頁版 + 此方式適合用于網站前臺和后臺都在TP中 + 此方式不需要引入TP的視圖驅動(topthink/think-view) >[info] TP6.0中的路由省略應用名只能用`入口文件綁定應用` 和 `域名綁定應用`,經過測試,最后得出`域名綁定應用`是最合適的部署方式。如果有更好的部署方案,歡迎分享。QQ:[23426945](http://wpa.qq.com/msgrd?v=3&uin=23426945&site=qq&menu=yes "23426945") #### 1. 下載TP6.0,引入多應用模式擴展 --- ``` composer create-project topthink/think tp6 composer require topthink/think-multi-app ``` #### 2. 配置多個虛擬域名(多個域名用于域名綁定應用) --- **apache虛擬主機配置文件:`conf/extra/httpd-vhosts.conf` 添加以下內容** <VirtualHost *:80> DocumentRoot "E:\www\thinkphp\tp6\public" ServerName tp6.cy ServerAlias liang.tp6.cy admin.tp6.cy </VirtualHost> **本地路由表:`C:/Windows/System32/drivers/etc/hosts` 域名映射IP** 127.0.0.1 tp6.cy 127.0.0.1 liang.tp6.cy 127.0.0.1 admin.tp6.cy #### 3. 此時三個域名都可以用于訪問 --- ![](https://img.itqaq.com/art/content/5a2ca05eee1ced700f9b03da5ff8ae19.png) #### 4. 域名綁定應用 --- **修改配置文件:`config/app.php`** ``` // 域名綁定(自動多應用模式有效) 'domain_bind' => [ '*' => 'index', 'liang' => 'admin', 'admin' => 'admin', ], ``` **此時 `tp6.cy` 綁定到了 `index應用`,`liang.tp6.cy` `admin.tp6.cy` 綁定到了 `admin應用`** ![](https://img.itqaq.com/art/content/1ca34f3b263d57b15232aa86ba5f84b7.png) #### 5. 復制 layuiadmin 單頁版的 `src`、`start` 目錄 --- ![](https://img.itqaq.com/art/content/4d23264f40ec74108f9818532cfe59d2.png) #### 6. 在TP6.0的public目錄下新建一個admin目錄,并將layuiadmin資源放進去 --- ![](https://img.itqaq.com/art/content/3c01b8454d24212d6fc0694444a611a1.png) **修改宿主頁面中的路徑、配置實時刷新緩存** ![](https://img.itqaq.com/art/content/d3b48d1923346e2f082a082210df47b3.png) #### 7. admin應用index控制器的index方法重定向到layuiadmin宿主頁面 --- **添加重定向** ![](https://img.itqaq.com/art/content/251e1d6e397a5bee026a83ff37e7731a.png) **訪問綁定到admin應用的域名,自動重定向到layuiadmin** ![](https://img.itqaq.com/art/content/a6be03ce8639ff9be4f866a592dd5231.png)
                  <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>

                              哎呀哎呀视频在线观看