摘要: 如果指示指定一个函数那么可以使用: \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; 如果想整个应用都返回JSON格式,那么可以在component中设置: 'response' => [ 'format' => 'json 阅读全文
posted @ 2018-12-14 16:16 fpc 阅读(1688) 评论(0) 推荐(0) 编辑