作者deathfullove (Deathful)
看板PHP
标题[请益] header 错误讯息
时间Tue Aug 30 21:32:40 2011
程式码:
<?php
.
. 略过
.
header("location:result.php?email={$_POST['email']}") ;
?>
错误讯息:
Warning: Cannot modify header information - headers already sent by
(output started at C:\AppServ\www\process.php:7) in
C:\AppServ\www\process.php on line 28
请问一下...这错误讯息是在说什麽...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.38.105.199
1F:→ sahjlee:在 header 之前已经有东西被输出了 (process.php 第7行) 08/30 21:34
2F:→ deathfullove:第7行是 <?php 08/30 21:37
3F:→ tkdmaf:所以你的第1行到第6行是HTML,那就是OUTPUT了。 08/30 21:38
4F:→ deathfullove:1~6 行砍掉了 08/30 21:41
5F:→ deathfullove:在 header() 之前 我有echo {$_POST['email']}; 08/30 21:42
6F:→ gname:bom? 08/30 21:43
7F:→ deathfullove:砍掉它就好了@@ 08/30 21:43
8F:→ deathfullove:因为要把process.php. 的echo 导到 result.php来显示 08/30 21:44
9F:→ deathfullove:问题解决了 谢谢大家>"< 08/30 21:45