iframe에서 로그인이 성공하면 자바 스크립트 리디렉션을 주 윈도우로 사용하려고합니다. 이 내 코드입니다 :JavaScript가 주 윈도우로 리디렉션되지 않아서 http 옵션 (&)이 적용되지 않습니다.
if ($_GET['redirect']!='') {
$redirect=$_GET['redirect'];
$smart->assign('redirect',$redirect);
}
$redirect=$_GET['redirect'];
echo $redirect;
if(isset ($_SESSION['user'])&&$_SESSION['user']!='') {
$user->email=$_SESSION['user'];
$user->addCorporate();
$user->signIn();
$user->loadSession();
echo("<script language=\"javascript\" type=\"text/javascript\">");
echo "document.write('redirecting...');";
if ($redirect!='') {
echo 'self.parent.location = "'.$redirect.'"';
} else
echo 'self.parent.location = "index.php"';
//echo $redirect;
// redirect($redirect);
echo "</script>";
}
에코 $redirect
표시 http://xxxxxxxx/play.php?action=play&id=d59541b89828da34e9a8345a1bdafe2b
하지만 재 지정 http://xxxxxxxx/play.php
로 만들어? (PHP 옵션 없음)
btw 잃어버린 물건은 PHP에만 국한되는 것이 아니라 일반적으로 HTTP와 URL 매개 변수라고합니다. 그게 공식 제목이 맞는지는 모르겠지만 그렇게 부르면 질문에 사람들을 끌어 들일 수 있습니다. – Nicolas78