Re: Re: header problem with IIS
| From: | Bernhard Döbler | Date: | Thu, 15 May 2003 15:21:41 +0000 |
| Subject: | Re: Re: header problem with IIS | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19950@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/function.header.php
reads:
Note: HTTP/1.1 requires an absolute URI as argument to Location: including the scheme, hostname and
absolute path, but some clients accept relative URIs. You can usually use
$_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute
URI from a relative one yourself:
Bernhard
----- Original Message -----
From: "Peter Misun" <misun@microstep-mis.com>
To: <php-windows@lists.php.net>; "Christoph Grottolo" <cg@gordimer.net>
Sent: Thursday, May 15, 2003 4:20 PM
Subject: [PHP-WIN] Re: header problem with IIS
>
>
> Christoph Grottolo wrote:
>
> > misun@microstep-mis.com (Peter Misun) wrote:
> >
> > >
> > >running PHP4.1.3 on IIS 5 and everything work's fine
> > >
> > >I have only problem with using header() function
> > >problem is, after submiting form in first.php:
> > > echo "<form name=form_abc method=post action=second.php>\n";
> > >and having in second.php:
> > > header('location:third.php');
> > >
> > >it produces error in browser like this:
> > > CGI Error [...]
> >
> > You must avoid body contents in second.php (do not generate any
> > output).
> >
> > Try with:
> >
> > <?php
> > header("Location:third.php");
> > exit;
> > ?>
> >
> > as second.php, this should work. If you don't put an exit call after
> > header(), you must make shure you have no output (no newlines and/or
> > spaces before opening <?php and after closing ?> tags, no echo's nor
> > print's...).
> >
> > Christoph
>
>
>
> i've got no output after ?>
> i'm sure
> and exit; doesn't help too
>
> 5o
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>