header已经发送,为什么还是返回false
header("Content-type: text/html; charset=gbk"); //发送一个报头
$a=headers_sent();
var_dump($a); //false
这里为什么返回false?????
------解决方案--------------------
手册中有人提到这个问题:
http://cn2.php.net/manual/en/function.headers-sent.php#86488
------解决方案--------------------
header("Content-type: text/html; charset=gbk"); <br />flush();//刷新输出缓冲 <br />var_dump(headers_sent());
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号