关于YII2框架Response content must not be an array的解决方法
public function actionGet_permissions(){\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;return Auth_Item::find()->where(['owner_user_id' => NULL])->all();}就是在要输出的代码之前 加上\Y
·
public function actionGet_permissions()
{
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
return Auth_Item::find()->where(['owner_user_id' => NULL])->all();
}
就是在要输出的代码之前 加上
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
更多推荐




所有评论(0)