<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國際加速解決方案。 廣告
                # 響應-Response ## Yaf官方的響應處理 **1、設置響應信息** * setHeader:設置響應頭信息 * setAllHeaders:批量設置響應頭 * setBody:設置響應體信息 * appendBody:在現在的body后面添加新的響應體 * prependBody:在現在的body前面添加新的響應體 * clearHeaders:清除頭部的設置 * clearBody:清除響應體的設置 在不設置響應頭信息的時候: ~~~ <?php class TestController extends \Yaf_Controller_Abstract { public function init() { } public function testAction() { echo 'test'; } } ~~~ 直接輸出:test 然后設置響應頭: ~~~ $res = $this->getResponse(); $res -> setHeader( 'Content-Type', 'text/html; charset=utf-8' ); $headers =array('Content-Type'=>'text/html;charset=utf-8', 'Server'=>'Yaf Server'); $res->setAllHeaders($headers); $res->appendBody('after content<br>'); $res->setBody('main content<br>'); $res->prependBody('before content<br>'); var_dump($res->getHeader()); ~~~ **2、獲取響應信息:獲取設置的響應信息** ~~~ getHeader:獲取某個響應頭信息 getBody:獲取響應體信息 ~~~ ## Yaf的響應類可以參考: [http://www.laruence.com/manual/yaf.class.response.html](http://www.laruence.com/manual/yaf.class.response.html) [http://php.net/manual/zh/class.yaf-response-abstract.php](http://php.net/manual/zh/class.yaf-response-abstract.php)
                  <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>

                              哎呀哎呀视频在线观看