php页面出现错误:Warning: Cannot modify header information - headers already sent by (output started at E:\phpweb\message\login.php:12) in E:\phpweb\message\login.php on line 46
最直接的办法是:用输出缓存来解决ob_start();
<?php ob_start(); ?>
... HTML codes ...
<?php
... php codes ...
Header("Location: ...");
ob_end_flush();
?>
1在页面顶部的php标签中加入ob_start();
2在返回的信息下面加入ob_end_flush();
也可以把header换成javascript的方式实现跳转