Redirect not working
Moderator: General Moderators
Redirect not working
I have a page that redirects at the end. For some reason on this single page it doesn't redirect. I've tried a hundred different things, it just goes to a blank page. If you look at the source code for the page it's completely blank. If I echo out the location of the redirect right before the line that redirects, it shows correctly. Also, it seems that it was working yesterday, and as far as I know there have been no changes to the page since then.
Additional info:
The way it currently works is this:
The end of the page shows this: show_screen($location);
This is that function:
I echo out the $location before it calls the function, and it works fine. I echo $loc inside the function and it's blank. If I bypass the function completely and just put in a header("Location: url.php") it doesn't redirect.
The way it currently works is this:
The end of the page shows this: show_screen($location);
This is that function:
Code: Select all
function show_screen($loc){
Header("Location: $loc");
exit;
}-
tapas_bahirbag
- Forum Newbie
- Posts: 14
- Joined: Sun Aug 06, 2006 6:54 am
- Contact:
You can try this:
--
Tapos Pal
Code: Select all
function show_screen($loc){
ob_end_flush();
Header("Location: $loc");
exit;
}Tapos Pal