Обсуждение: RedirectING (asp) by PHP?
Hi,
"redirect" command in PHP?
header("location:URL");
there must be noting send to the web page before this (not even a white space) or u will get an error. if u have to send something first use javascript to redirect
some thing like
<script>
location.href="url"
</script>
This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.asp "-----Original Message-----
From: esrefatak [mailto:esrefatak@hotmail.com]
Sent: Wednesday, July 30, 2003 12:34 PM
To: pgsql-php@postgresql.org
Subject: [PHP] RedirectING (asp) by PHP?Hi,"redirect" command in PHP?
Thank you.
You tired me via your reply. :)
I received just 4 number reply. :)
Again thanks
----- Original Message -----From: Duncan Adams (DNS)Sent: Wednesday, July 30, 2003 2:03 PMSubject: Re: [PHP] RedirectING (asp) by PHP?header("location:URL");there must be noting send to the web page before this (not even a white space) or u will get an error. if u have to send something first use javascript to redirectsome thing like<script>location.href="url"</script>This e-mail is sent on the Terms and Conditions that can be accessed by Clicking on this link http://www.vodacom.net/legal/email.asp "-----Original Message-----
From: esrefatak [mailto:esrefatak@hotmail.com]
Sent: Wednesday, July 30, 2003 12:34 PM
To: pgsql-php@postgresql.org
Subject: [PHP] RedirectING (asp) by PHP?Hi,"redirect" command in PHP?
I use this
// redirect ***************************************************************
// Redirects to relative URL
function redirect($to)
{
$schema = $_SERVER['SERVER_PORT']=='443'?'https':'http';
$host =
strlen($_SERVER['HTTP_HOST'])?$_SERVER['HTTP_HOST']:$_SERVER['SERVER_NAME'];
if (headers_sent()) return false;
else
{
header("Location: $schema://$host$to");
exit();
}
}
----- Original Message -----
From: "esrefatak" <esrefatak@hotmail.com>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, July 30, 2003 03:34
Subject: [PHP] RedirectING (asp) by PHP?
Hi,
"redirect" command in PHP?