You are here: RE: [PHP] Location .... « PHP « IT news, forums, messages
RE: [PHP] Location ....

Posted by Jay Blanchard on 12/28/05 16:19

[snip]
Could you tell me a efficient solution for change page (new location) in
PHP? I tried this code : header("Location: mypage.php");

But in some case, I have error message "heade already send". Then I use a
javascript solution : window.location.href="mypage.php";

Is there a good solution in php ?
[/snip]

Header is a good solution, and is the only one available in PHP for
redirects. It requires that you do not send anything else out to the
browsers before sending the redirect, which is what is causing your error.
You can always use the output buffer functions to assist with that.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация