redirect doesn't work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: redirect doesn't work (/showthread.php?tid=27476) Pages:
1
2
|
redirect doesn't work - El Forum - 02-12-2010 [eluser]maria clara[/eluser] [quote author="max123" date="1265978250"]I don't understand about the white space. Also I can't find the extra white space i my code.[/quote] i have encountered that error before. if im not mistaken i just adjusted the code. but any way, have you tried the code?? can you show me what happen?? EDIT: have you checked your .htaccess?? redirect doesn't work - El Forum - 02-12-2010 [eluser]max123[/eluser] Yes I tried the code. But still it gives the same error.Can u tell me the location of the white space in my code. I have no idea about the white space Code: if($rows>=3) redirect doesn't work - El Forum - 02-12-2010 [eluser]maria clara[/eluser] [quote author="max123" date="1265979494"]Yes I tried the code. But still it gives the same error.Can u tell me the location of the white space in my code. I have no idea about the white space Code: if($rows>=3) have you tried this one? Code: if($rows>=3) Quote:it is something like this: P.S. I can't explain it directly. having hard time explaining redirect doesn't work - El Forum - 02-12-2010 [eluser]maria clara[/eluser] does your Quote:/seeker/a folder?? if so, can try fixing the .htaccess with this: Code: RewriteRule ^<foldername>/(.*)$ <foldername>/$1 [L] or try this way: Code: if($rows>=3) redirect doesn't work - El Forum - 02-12-2010 [eluser]max123[/eluser] /seeker/ is the controller. I tried all the things you said. But Still it gives the same error. Any ways thanx a lot for your support. Please let me know if u find any solution for this. redirect doesn't work - El Forum - 02-12-2010 [eluser]max123[/eluser] Hi maria, I found the reason. There are 2 echo statements inside a function above to the function that has redirect. I removed those echo statements. Now redirect works finely. Now the problem is how can I use those echo statements in the upper function. Do u have any idea? redirect doesn't work - El Forum - 02-12-2010 [eluser]maria clara[/eluser] [quote author="max123" date="1265985096"]Hi maria, I found the reason. There are 2 echo statements inside a function above to the function that has redirect. I removed those echo statements. Now redirect works finely. Now the problem is how can I use those echo statements in the upper function. Do u have any idea?[/quote] can you post the code that refers to it?? or errors if you have redirect doesn't work - El Forum - 02-13-2010 [eluser]coolgeek[/eluser] [quote author="max123" date="1265985096"]Hi maria, I found the reason. There are 2 echo statements inside a function above to the function that has redirect. I removed those echo statements. Now redirect works finely. Now the problem is how can I use those echo statements in the upper function. Do u have any idea?[/quote] You can't redirect after you've already echoed something. HTTP headers were already sent in order to execute the echo statements. The redirect() function sends a redirect header. You will need to store the statements in a session variable and present them from within the page you redirect to. |