解决办法: 找到framework\web\widgets\captcha\CCaptchaAction.php 在header('Pragma: public');前加 ob_clean();