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

                >[danger] 永遠不要相信用戶提交的數據! ## 安全開發指導 1. 參考ThinkPHP官方[安全指導](http://www.hmoore.net/manual/thinkphp5_1/354111) 2. 接口接收數據時要對數據進行js腳本過濾 >[info] 以上方法僅作為安全輔助,沒有一勞永逸的方法可以防止所有攻擊。要做好數據檢查,選用合適的過濾方法。 ## 禁止訪問敏感目錄 由于框架將入口文件從public移動到了應用目錄,使一些不該被訪問的目錄也暴露了出來。如果將入口文件移動到public目錄,需要改動的地方比較多,所以不建議這樣做。 為了安全考慮,可以將一些敏感目錄設置為禁止訪問。 【Nginx】 在Nginx配置文件中,加入以下規則 ``` location ^~ /addon{ deny all; } location ^~ /runtime { deny all; } location ^~ /extend{ deny all; } location ^~ /application { deny all; } location ^~ /route{ deny all; } location ^~ /thinkphp { deny all; } location ^~ /vendor { deny all; } ``` 【Apache】 在框架根目錄的.htaccess文件加入以下規則 ``` RewriteRule ^addon - [F,L] RewriteRule ^runtime - [F,L] RewriteRule ^extend - [F,L] RewriteRule ^application - [F,L] RewriteRule ^route - [F,L] RewriteRule ^thinkphp - [F,L] RewriteRule ^vendor - [F,L] ``` 完整內容 ``` <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] RewriteRule ^addon - [F,L] RewriteRule ^runtime - [F,L] RewriteRule ^extend - [F,L] RewriteRule ^application - [F,L] RewriteRule ^route - [F,L] RewriteRule ^thinkphp - [F,L] RewriteRule ^vendor - [F,L] </IfModule> ``` ## 系統設置 1. 在config/app.php 文件中deny_module_list 中加入禁止訪問模塊 2. 在config/app.php 文件app_debug 改為false ## 后臺地址重命名 1、public下復制index.php里面的內容新建一個admin.php(**可以自定義,注意與偽靜態中的文件名保持一致**), ~~~ Container::get('app')->run()->send(); ~~~ 替換為 ~~~ Container::get('app')->bind('manage')->run()->send(); ~~~ 2、config/app.php deny_module_list 中增加 manage,例如: ~~~ 'deny_module_list' => ['common','crontab','job','manage'], ~~~ 修改 ~~~ 'rename_manage' => true,//后臺是否重名了,后臺重命名需要開啟 ~~~ 3、修改nginx偽靜態配置為: ~~~ location / { if (!-e $request_filename){ rewrite ^/admin.php/(.*)$ /admin.php?s=/$1 last; rewrite ^(.*)$ /index.php?s=$1 last; break; } } ~~~ apache的偽靜態需要配置為: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L] RewriteRule ^admin.php/(.*)$ admin.php?s=/$1 [QSA,PT,L] </IfModule>
                  <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>

                              哎呀哎呀视频在线观看