<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 功能強大 支持多語言、二開方便! 廣告
                # Response Your Slim app’s routes and middleware are given a PSR-7 response object that represents the current HTTP response to be returned to the client. The response object implements the[PSR-7 ResponseInterface](http://www.php-fig.org/psr/psr-7/#3-2-1-psr-http-message-responseinterface)with which you can inspect and manipulate the HTTP response status, headers, and body. > Slim應用程序的路由和中間件都有一個PSR-7響應對象,該對象表示當前要返回給客戶機的HTTP響應。response對象實現了[PSR-7 ResponseInterface](http://www.php-fig.org/psr/psr-7/#3-2-1-psr-http-message-responseinterface),您可以使用該對象檢查和操作HTTP響應狀態、頭和正文。 ## 如何獲取響應對象 The PSR-7 response object is injected into your Slim application routes as the second argument to the route callback like this: > 將PSR-7響應對象作為路由回調的第二個參數注入到slim應用程序路由中,如下所示: ~~~php <?php use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Slim\Factory\AppFactory; require __DIR__ . '/../vendor/autoload.php'; $app = AppFactory::create(); $app->get('/hello', function (ServerRequest $request, Response $response) { $response->getBody()->write('Hello World'); return $response; }); $app->run(); ~~~ Figure 1: Inject PSR-7 response into application route callback.
                  <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>

                              哎呀哎呀视频在线观看