내가 지불 업체에서 지불을 처리하는 스크립트가 다음에 "감사합니다"페이지를 표시 할 PHP
리디렉션을 사용하여 실행할 수 있습니다.헤더 위치 리디렉션 PHP 명령을 두 번
자료 :
<head>
<meta http-equiv="refresh" content="0; url=http://site.com/index.html">
</head>
<script type="text/javascript">
alert("Some alert");
</script>
그러나 header("Location: ../success.html");
명령이 두 번 실행 (사용자를 제공하기 위해 일으키는 success.html의
include_once 'Websend.php';
if ($file != "GREAT") {
header("Location: ../failed.html");
exit();
} else {
$ws = new Websend("192.168.56.105");
$ws->connect("passwd");
$ws->doCommandAsConsole("give " . $token . " 2000");
$ws->disconnect();
header('Location: ../success.html');
exit();
}
출처 : (http://pastebin.com/raw.php?i=TmmysJiD Websend.php 소스를 포함 여기에있다) 일이 안 두 배. 내가 제거 header("Location: ../success.html");
코드는 그것이 있어야로 작동합니다.
왜 이런 일이 발생합니까?
이'succes.html'에 그 코드가
header('Location: ../success.html');
header('Location: ../index.html');
에 변경하려고 ?? 그렇다면 대답은 자명해야합니다. –succes.html의 내용을 게시하십시오 –
@Dagon 아니요, 이것은 지불 공급자가 리디렉션하는 PHP 파일에 있습니다. – Timothy