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

Posted by "Silvio Porcellana [tradeOver]" on 12/28/05 16:24

Christian Ista wrote:
> Hello,
>
> Could you tell me a efficient solution for change page (new location) in
> PHP? I tried this code : header("Location: mypage.php");
>
note: HTTP/1.1 requires an absolute URI
http://php.net/header

> 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 ?
>

Check out 'headers_sent', you can choose how to redirect ('header' or
JavaScript) depending on whether you have sent the headers or not.

http://php.net/headers_sent

HTH, cheers
Silvio

--
tradeOver | http://www.tradeover.net
....ready to become the King of the World?

 

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

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