> I get the code at the end of this message whenever I
> load a page that redirects to another page (i.e. I use
> the 'header("Location: page.php")' command). What's
> going on? It doesn't do this when the page doesn't
> redirect, only when it does redirect. Any thoughts?
> This is PHP4, if that helps, but it does the same with
> 3 (tried both versions).

Be sure you call the header function before you write any data to the client.. After 
you wrote data (html) to the client you'll get an php error which is saying dat their 
was already output on line xx.

If you can't hold back to the data till the end of the page, consider using the output 
buffering (ob_start()). This prevents that data is written to the client until you 
call the flush function (ob_flush) or if you call the ob_get_contents functions which 
will return the page output as a string.

For more information about output buffering see 
http://www.php.net/manual/en/ref.outcontrol.php

Success,

Dave Mertens

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to