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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:19:44
Original
1105 people have browsed it

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


回复讨论(解决方案)

ob_start(); 放到最前面去

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template