liran brener
|
| Posted: 01/23/2003, 12:26 PM |
|
Belive me I tried using the discussing groups, reading email, browsing the
web and so far nothing. The problem is that I can't redirect after the
headers are already send and that's making me a nightmares.
How can I redirect and keep all the session variables with their values????
I have changed the common.php redirect to :
// redirect url
function RedirectUrl($redirect_url)
{
if (!headers_sent())
{
header("Location: ".$redirect_url);
}
else
{
printf("\n<meta http-equiv=\"refresh\"
content=\"0;URL=".$redirect_url."\">\n");
}
}
?>
and the headers always been send so I can only use the meta tag.
And it's making my life a living hell ...
liran
liran@write-tec.com
__________________________________________________________________ ICQ#:
205461326 Current ICQ status: + More ways to contact me
__________________________________________________________________
|
|
|
 |
Sixto Luis Santos
|
| Posted: 01/23/2003, 7:33 PM |
|
Hello there,
You can handle this fairly easy with 1 of 2 approaches. Either turn on
buffering at the engine level by setting output_buffering=On in php.ini (if
you don't have control of the server, you won't be able to do this), or turn
on buffering at the script level by manually including the instruction
ob_start(); at the top of the Common.php file (right below <?php ).
Regards,
Sixto
"liran brener" <liran@write-tec.com> wrote in message
news:b0pj4r$rjr$1@news.codecharge.com...
> Belive me I tried using the discussing groups, reading email, browsing the
> web and so far nothing. The problem is that I can't redirect after the
> headers are already send and that's making me a nightmares.
>
>
>
> How can I redirect and keep all the session variables with their
values????
>
>
>
> I have changed the common.php redirect to :
>
> // redirect url
>
> function RedirectUrl($redirect_url)
>
> {
>
> if (!headers_sent())
>
> {
>
> header("Location: ".$redirect_url);
>
>
>
> }
>
> else
>
> {
>
> printf("\n<meta http-equiv=\"refresh\"
> content=\"0;URL=".$redirect_url."\">\n");
>
> }
>
> }
>
>
>
> ?>
>
>
>
> and the headers always been send so I can only use the meta tag.
>
> And it's making my life a living hell ...
>
>
>
> liran
>
> liran@write-tec.com
>
>
>
> __________________________________________________________________ ICQ#:
> 205461326 Current ICQ status: + More ways to contact me
> __________________________________________________________________
>
>
|
|
|
 |
|