解决方法一 @ob_end_clean(); 解决方法二 if(ob_get_contents()) ob_end_clean(); 转载于:https://www.cnblogs.com/xiaozong/p/5296370.html