excel输出干扰 导出文件变成直接输出到页面

浏览:1343 发布日期:2013/12/25 分类:求助交流
NOTIC: [2] Cannot modify header information - headers already sent by (output started at /Index/Lib/Action/CommonAction.class.php:1) /ThinkPHP/Lib/Core/View.class.php 第 95 行.
NOTIC: [2] Cannot modify header information - headers already sent by (output started at /Index/Lib/Action/CommonAction.class.php:1) //ThinkPHP/Lib/Core/View.class.php 第 96 行.
NOTIC: [2] Cannot modify header information - headers already sent by (output started at /Index/Lib/Action/CommonAction.class.php:1) /ThinkPHP/Lib/Core/View.class.php 第 97 行.
看了下这个Core/View.class.php 文件。
private function render($content,$charset='',$contentType=''){
if(empty($charset)) $charset = C('DEFAULT_CHARSET');
if(empty($contentType)) $contentType = C('TMPL_CONTENT_TYPE');
// 网页字符编码
header('Content-Type:'.$contentType.'; charset='.$charset);
header('Cache-control: '.C('HTTP_CACHE_CONTROL')); // 页面缓存控制
header('X-Powered-By:ThinkPHP');
// 输出模板文件
echo $content;
}
95.96.97就是中间那三个header
==========================
本地window下没问题,上传到nginx就出问题。。。
最佳答案
评论( 相关
后面还有条评论,点击查看>>