RE: [PHP] I'm really getting annoyed with PHP
| From: | Chris W. Parker | Date: | Wed, 23 Jul 2003 19:56:04 +0000 |
| Subject: | RE: [PHP] I'm really getting annoyed with PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-156518@lists.php.net to get a copy of this message | ||
Petre Agenbag <mailto:internet@vsa.co.za>
on Wednesday, July 23, 2003 12:55 PM said:
> If you want to "use PHP", then you must use the headers() function.
> BUT, with the header function, you MUST make sure that there will be
> absolutely NO output to the page before the header() function is
> called, not even a space...
If there is a "even a space" you can turn output buffering on so that
the redirect will still work.
<?
ob_start();
echo "hello";
header("Location: page.php");
?>
will work just fine.
chris.
p.s. exactly what is the code you are using in your script that's not
working? and what browser are you using?