An Error occurred while handling another error:
exception 

\’yii\web\HeadersAlreadySentException\’ with message \’Headers already sent in /xxxx/xxxx/xxx.php on line 90.\’ in /xxxx/xxxx/vendor/yiisoft/yii2/web/Response.php:366

Stack trace:
#0 /xxxx/xxxx/vendor/yiisoft/yii2/web/Response.php(339): yii\web\Response->sendHeaders()
#1 /xxxx/xxxx/vendor/yiisoft/yii2/web/ErrorHandler.php(135): yii\web\Response->send()
#2/xxxx/xxxx/vendor/yiisoft/yii2/base/ErrorHandler.php(111):

yii\web\ErrorHandler->renderException(Object(yii\web\HeadersAlreadySentException))

#3 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\web\HeadersAlreadySentException))
#4 {main}

使用echo 输出json格式输出,结尾没有加exit导致的报错

转自:https://blog.csdn.net/renamayu/article/details/79799208

版权声明:本文为feiquan原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/feiquan/p/10921153.html