众所周知,header函数前是不能输出任何数据的,如果要在header函数前输出数据要怎么做?
<?php ob_start(); echo 'hello'; header('Location: http://www.baidu.com/'); ob_flush();