Re: I'm really getting annoyed with PHP
| From: | Andrew Brampton | Date: | Wed, 23 Jul 2003 20:08:26 +0000 |
| Subject: | Re: I'm really getting annoyed with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156522@lists.php.net to get a copy of this message | ||
Just a minor change, the HTTP Specification says that the Location header
should use a absoluteURI which includes the full URL not just page.php... so
http://yoursite.com/page.php is what you should be using
there.
Andrew
----- Original Message -----
From: "Chris W. Parker" <cparker@swatgear.com>
To: "Petre Agenbag" <internet@vsa.co.za>; "Beauford.2005"
<beauford.2005@rogers.com>
Cc: <php-general@lists.php.net>
Sent: Wednesday, July 23, 2003 8:56 PM
Subject: RE: [PHP] I'm really getting annoyed with PHP
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?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php