下载文件提示 \Cannotcall sendError() after the response has been committed**
出现这个错误,应该是多次response导致的,可以这么理解,将文件写入response后就关闭了socket,这个时候再次发送response给客户端就会出现这个问题。
1 | 还加return AjaxVoResult 会发生Cannot call sendError() after the response has been committed 错误,因为download方法里面已经将要返回的数据写入response里面了 |