Zaxon Spox wrote on Thu, 28 July 2005 06:10 |
Warning: Cannot add header information - headers already sent by (output started at c:\apache\htdocs\forum\theme\default\register.php:1635) in c:\apache\htdocs\forum\theme\default\register.php on line 1408
|
It is said that cannot add header information:
at line 1635:
function send_email($from, $to, $subj, $body, $header='')
{
if( empty($to) || !count($to) ) return;
if( $GLOBALS['USE_SMTP'] == 'Y' ) {
$smtp = new fud_smtp;
$smtp->msg = $body;
$smtp->subject = $subj;
$smtp->to = $to;
$smtp->from = $from;
$smtp->headers = $header;
$smtp->send_smtp_email();
}
else {
$bcc='';
if( is_array($to) ) {
if( ($a = count($to)) > 1 ) {
$bcc = "Bcc: ";
for( $i=1; $i<$a; $i++ ) $bcc .= $to[$i].', ';
$bcc = substr($bcc,0,-2);
}
$to = $to[0];
}
if( $header )
$header = "\n".str_replace("\r", "", $header);
else if( $bcc )
$bcc = "\n".$bcc;
THIS LINE mail($to, $subj, str_replace("\r", "", $body), "From: $from\nErrors-To: $from\nReturn-Path: $from\nX-Mailer: FUDforum v".$GLOBALS['FORUM_VERSION'].$header.$bcc);
}
}
& at 1408 line:
function check_return()
{
if ( empty($GLOBALS['returnto']) )
$GLOBALS['returnto']='http://localhost/forum/index.php?'._rsidl;
else {
$url_bits = parse_url($GLOBALS['returnto']);
$GLOBALS['returnto']='http://localhost/forum/index.php?'._rsidl;
if( $url_bits['query'] ) {
parse_str(str_replace('&amp;', '&', $url_bits['query']), $url_args);
if( is_array($url_args) ) {
foreach( $url_args as $k => $v ) {
if( $k == 'S' || $k == 'rid' ) continue;
$GLOBALS['returnto'] .= '&'.$k.'='.urlencode($v);
}
}
}
}
THIS LINE header("Location: ".$GLOBALS['returnto']);
exit();
}class fud_smtp
{
What to do? Is there any solution? Mayby I just del somthing like barbarians do...
[Updated on: Thu, 28 July 2005 21:03]
Report message to a moderator