Re: [PHP] Warning with Header("Location: test.php")
Hi, * [EMAIL PROTECTED] wrote: > Warning: Cannot add header information - headers already sent by (output > started at /var/www/html/test.php:5) in /var/www/html/test.php on line 15 You see that the output began on /var/www/html/test.php on line 5. It may be a char or even a whitespace. Normally you shouldn't have any output before the Header() call. But you could also use output buffering to have output even before the header calls (PHP will sort the output stacks and send the header stack first), i.e. http://www.php.net/";); ?> -- PHP Magazines for Professionals PHP Magazin * PHP Magazine http://www.phpmag.de/ * http://www.php-mag.net/ German Edition* International Edition with own topics -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Warning with Header("Location: test.php")
> I have user Header("Location: test.php") in a php file. It is not working, > instead I have got a warning of the form > > Warning: Cannot add header information - headers already sent by (output > started at /var/www/html/test.php:5) in /var/www/html/test.php on line 15 header() must come before any output. You have output starting on line 5, just like the warning says... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Warning with Header("Location: test.php")
your header command must go before any other out put to the page .. eg boo etc > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, 26 November 2002 3:02 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Warning with Header("Location: test.php") > > > I have user Header("Location: test.php") in a php file. It is not working, > instead I have got a warning of the form > > Warning: Cannot add header information - headers already sent by (output > started at /var/www/html/test.php:5) in /var/www/html/test.php on line 15 > > Here line 15 contains the Header ("Location:test.php") line. > I will be grateful if you can help me. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php