Home >Backend Development >PHP Tutorial >php中flush和header同时使用报错问题

php中flush和header同时使用报错问题

WBOY
WBOYOriginal
2016-06-23 14:19:441076browse

我在header前面有输出,怎样让下面的代码header不报错?求解决办法。。。。
//这是我加入的代码
echo 'sd';
ob_flush(); 
flush(); 
//下面是系统的代码,无法改变。
ob_start();
header('Status: 2342');
?>


回复讨论(解决方案)

ob_start(); 放到最前面去

ob_start(); 放到最前面去
这个是系统代码啊,无法改变。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn