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

                ### 1、虛擬主機設置 路徑:```D:\wamp64\bin\apache\apache2.4.27\conf\extra``` ``` <VirtualHost *:80> DocumentRoot "F:\www\TP5.1\1.0\public" ServerName tp5-1.com ServerAlias tp5-1.com #ErrorLog "logs/Domain-error.log" #CustomLog "logs/Domain-access.log" combined </VirtualHost> ``` 如圖: ![](https://box.kancloud.cn/6d0f2aa90ecfe45191dba7012e4334e1_400x131.png) ### 2、Hosts文件設置 路徑:```C:\Windows\System32\drivers\etc\HOSTS``` ``` 127.0.0.1 tp5-1.com ``` 如圖: ![](https://box.kancloud.cn/7d105e8d2a36b06e719419888d57f662_248x178.png) ### 3、對模板進行全局替換配置 >[danger] 首先,我們需要對模板輸出替換進行設置,可以直接在源碼根目錄的 ```config/template.php``` 配置文件中添加: ``` // 對模板進行全局替換配置 'tpl_replace_string' => [ '__STATIC__'=>'/static', ] ``` 如圖: ![](https://box.kancloud.cn/8873eb2687cd863f0626dd3c6aa62cb2_458x555.png) ### 4、路由設置 >[info] 路由文件在源碼根目錄的 ```route``` 文件夾里面,有一個 ```route.php``` 文件,打開它。 位置如下: ![](https://box.kancloud.cn/cbbec84adda0dcb5f32d3cc0886a6c10_390x179.png) 代碼如下: ``` <?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: liu21st <liu21st@gmail.com> // +---------------------------------------------------------------------- use think\facade\Route; Route::rule('/', 'index/index/index'); Route::rule('login', 'index/login/index'); Route::rule('verify', 'index/login/verify'); Route::rule('logout', 'index/login/logout'); return [ ]; ``` ### 5、Session設置 >[info] Session 配置文件在源碼根目錄的 ```config``` 文件夾里面,有一個 ```session.php``` 文件,打開它。 位置如下: ![](https://box.kancloud.cn/f46a7f365ebf588e017c1b8c4c7fe7e9_315x290.png) 代碼如下: ``` <?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK ] // +---------------------------------------------------------------------- // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: liu21st <liu21st@gmail.com> // +---------------------------------------------------------------------- // +---------------------------------------------------------------------- // | 會話設置 // +---------------------------------------------------------------------- return [ 'id' => '', // SESSION_ID的提交變量,解決flash上傳跨域 'var_session_id' => '', // SESSION 前綴 'prefix' => 'think', // 驅動方式 支持redis memcache memcached 'type' => '', // 是否自動開啟 SESSION 'auto_start' => true, ]; ``` ### 6、驗證碼設置 >[info] 驗證碼的配置在 登錄控制器里面 代碼如下: ``` /** * 生成驗證碼 * @return \think\Response */ public function verify() { // 驗證碼配置 $config = [ // 驗證碼字體大小 'fontSize' => 20, // 驗證碼位數 'length' => 4, // 寬度 'imageW' => 360, // 高度 'imageH' => 60, // 關閉驗證碼雜點 'useNoise' => false, ]; $captcha = new Captcha($config); return $captcha->entry(); } ``` >[danger] 之后的文檔當中,項目配置當中的操作,不會再給出截圖,只會給出相應的代碼
                  <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>

                              哎呀哎呀视频在线观看