note 103426 deleted from function.header by tularis

From: Date: Fri, 04 Apr 2014 11:32:52 +0000
Subject: note 103426 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-199178@lists.php.net to get a copy of this message
Note Submitter: polo at polosson dot com ---- It seems that Internet Explorer can not execute an @ before the function 'header ("location: $ page")' (to ignore it if the contained variable is not defined). At launch, IE loads the page indefinitely, without displaying anything (not even an error message) as if there were an infinite loop of redirection. However, Firefox supports this escape character and passes through the 'header()' without running it, and everything goes well. I am not able to explain why, but I wanted to say that in order to help those like me who have lost a lot of time with this problem! Example: My original code was : <?php @header("Location: $redirection") ; ?> and to make it work with Internet Explorer, I had to replace it with : <?php if (isset($redirection)) { header("Location: $redirection") ; } ?> Sincerely, . Polosson

« previous php.notes (#199178) next »