<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之旅 廣告
                >[danger] 該組件為系統組件,在組件樹中只可命名為 request ,不可修改為其他名稱。 ## 請求 請求組件用來獲取所有HTTP請求參數。 | 類 | 調用 | 運行環境 | | --- | --- | --- | | Mix\Http\Message\Request\HttpRequest | app()->request | mix-httpd | | Mix\Http\Message\Request\Compatible\HttpRequest | app()->request | Apache/PHP-FPM | ## 依賴注入配置 [>> 到 GitHub 查看默認配置 <<](https://github.com/mix-php/mix/blob/v2/applications/http/config/main_coroutine.php#L178) ## 獲取參數 | 方法 | 描述 | | --- | --- | | route | 獲取路由參數 | | get | 獲取 $_GET 參數 | | post | 獲取 $_POST 參數 | | files | 獲取 $_FILES 參數 | | server | 獲取 $_SERVER 參數 (全部小寫) | | header | 獲取 HEADER 參數 (全部小寫) | | getRawBody | 返回原始的 HTTP 包體 | >[success] 以上所有方法變量名不存在時返回 null。 ## 請求類型 | 方法 | 描述 | | --- | --- | | method | 返回請求類型 | | isGet | 是否為 GET 請求 | | isPost | 是否為 POST 請求 | | isPut | 是否為 PUT 請求 | | isPatch | 是否為 PATCH 請求 | | isDelete | 是否為 DELETE 請求 | | isHead | 是否為 HEAD 請求 | | isOptions | 是否為 OPTIONS 請求 | ## 請求路徑 | 方法 | 描述 | | --- | --- | | root | 返回請求的域名 | | path | 返回請求的路徑 | | url | 返回請求的URL | | fullUrl | 返回請求的完整URL | ## 獲取路由參數 ~~~ // 獲取單個參數 app()->request->route('name'); // 獲取所有參數,返回數組 app()->request->route(); ~~~ ## 獲取 `GET` 參數 ~~~ // 獲取單個參數 app()->request->get('name'); // 獲取所有參數,返回數組 app()->request->get(); ~~~ ## 獲取 `POST` 參數 ~~~ // 獲取單個參數 app()->request->post('name'); // 獲取所有參數,返回數組 app()->request->post(); ~~~ ## 獲取 `FILES` 參數 ~~~ // 獲取單個參數 app()->request->files('name'); // 獲取所有參數,返回數組 app()->request->files(); ~~~ ## 獲取 `SERVER` 參數 ~~~ // 獲取單個參數 app()->request->server('name'); // 獲取所有參數,返回數組 app()->request->server(); ~~~ ## 獲取 `HEADER ` 參數 ~~~ // 獲取單個參數 app()->request->header('name'); // 獲取所有參數,返回數組 app()->request->header(); ~~~ ## 返回原始的 `HTTP` 包體 ~~~ app()->request->getRawBody(); ~~~ ## 返回請求路徑 ~~~ app()->request->root(); // http//www.domain.com app()->request->path(); // index/index.html app()->request->url(); // http//www.domain.com/index/index.html app()->request->fullUrl(); // http//www.domain.com/index/index.html?s=hello ~~~
                  <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>

                              哎呀哎呀视频在线观看