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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # esponse參數配置 ## 方式一、全局配置 用于接口開發 適用:只有所有請求都是application/json類型時可用。 ~~~ $config = [ 'components' => [ 'response' => [ 'format' => 'json' ], ], ]; ~~~ ## 方式二,通過前置操作實現。 適用:只有控制器中所有請求都是application/json類型時可用。 前置函數 ~~~ public function beforeAction($action) { return Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; } ~~~ 行為(通過過濾器來實現) ~~~ public function behaviors() { return [ ['class' => ContentNegotiator::className(), 'formats' => ['application/json' => Response::FORMAT_JSON, ], ], ]; } ~~~ ## 方式三、在方法中配置。 適用:只適用與json返回,注意排除render返回。 ~~~ Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; ~~~ 注意:yii內置的方法返回的直接是json對象,而使用hson\_encode返回的是json字符串,需要在ajax請求中增加dataType:'json'屬性,接收的才是json對象。
                  <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>

                              哎呀哎呀视频在线观看