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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## Annotation格式路由寫法 ### **開發環境推薦使用此方式去生成路由規則** 在控制器中的Action都可以增加一個 @Route 的路由規則,如果`Config::router('auto_build')` 為``true``,會自動生成對應的路由規則, 為了保證性能請在生產環境請將`Config::config('auto_build')`設置為`false` 。 ### REQUEST_TYPE 類型 | 描述 | REQUEST_TYPE | | --- | --- | | 匹配所有請求類型 | ALL | | 匹配GET請求類型 | GET | | 匹配POST請求類型| POST | | 匹配PUT請求類型| PUT | | 匹配DELETE請求類型| DELETE | | 匹配HEAD請求類型| HEAD | | 匹配OPTIONS請求類型| OPTIONS | @Route [REQUEST_TYPE = ALL] 靜態規則(多個規則空格隔開) 例如 ``System/Home/IndexController`` ``` <?php namespace App\System; use GFPHP\Controller; class IndexController extends Controller{ /** * 訪問 域名/index.html 將會指向此Action * @Route GET index.html * @return mixed|String */ public function indexAction() { return 'hello this is index.html'; } /** * GET 訪問 list.html和list-(\d+).html 會指向此Action * @Route GET list.html list-(\d+).html * @param int $page * @return mixed|String */ public function listAction($page = 1) { return 'hello this is list-' . $page . '.html'; } /** * POST訪問 add.html 將會指向此Action * @Route POST add.html * @return mixed|String */ public function addAction() { return 'hello this is add.html'; } /** * 默認匹配所有請求類型 * @Route all.html * @return mixed|String */ public function all_typeAction() { return 'hello this is all.html'; } } ``` 下為自動生成的對應 `Annotation.php` 路由規則 ~~~ <?php /** * Created by GFPHP. */ /** * 訪問 域名/index.html 將會指向此Action * @Route GET index.html * @return mixed|String */ \GFPHP\Router::get('index.html', 'Home/Index@index'); /** * GET 訪問 list-(\d+).html 會指向此Action * @Route GET list.html list-(\d+).html * @param int $page * @return mixed|String */ \GFPHP\Router::get('list.html', 'Home/Index@list'); \GFPHP\Router::get('list-(\d+).html', 'Home/Index@list'); /** * POST訪問 add.html 將會指向此Action * @Route POST add.html * @return mixed|String */ \GFPHP\Router::post('add.html', 'Home/Index@add'); /** * 默認匹配所有請求類型 * @Route all.html * @return mixed|String */ \GFPHP\Router::post('add.html', 'Home/Index@all_type'); ~~~
                  <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>

                              哎呀哎呀视频在线观看