php - javascript redirecting to main window doesn't take into account http option (&) -
I'm testing to use JavaScript redirects on the main window after I have succeeded in an iframe . This is my code:
if ($ _GET ['redirect']! = '') {$ Redirect = $ _ GET ['redirect']; $ Smart-> Allocated ('redirect', $ redirect); } $ Redirect = $ _ GET ['redirect']; $ Redirect echo; If (isset ($ _SESSION ['user']) and $ _ session ['user'] = '') {$ user-> Email = $ _ session ['user']; $ User- & gt; AddCorporate (); $ User- & gt; Sign-in (); $ User- & gt; LoadSession (); Echo ("& lt; script language = \" javascript \ "type = \" text / javascript \ "& gt;"); Echo "document.write ('redirecting ...');"; If ($ redirect! = '') {Echo 'self.parent.location = "'. $ Redirect. '' ';';} Else echo 'self.parent.location =" index.php "'; // resonance Echo resonance; // redirect ($ redirect); echo "& lt; / Script> ";}
echo $ redirect
displays http: //xxxxxxxx/play.php? Action = play & amp; ; Id = d59541b89828da34e9a8345a1bdafe2b
but redirects to http: //xxxxxxxx/play.php
(without PHP options)
It looks very mysterious Here's how I will proceed: Turn off Javascript in your browser and check your built-in JavaScript. Less, you know that maybe Wrong URLs for some strange reasons should be printed after all or the redirection of the problem is in the part.
Comments
Post a Comment