전자 메일을 보내고 기본 페이지로 리디렉션하는 스크립트를 작성하려고합니다. 네, 그게 효과가 있어요! 하지만 ...IE에서 PHP 리디렉션이 작동하지 않습니까?
IE에서는 작동하지 않습니다.
코드 예제 :
<?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
//$email_to1 = "[email protected]";
$email_to2 = "[email protected]";
$email_subject = "Email from www.abc.com";
................
................
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
//@mail($email_to1, $email_subject, $email_message, $headers);
@mail($email_to2, $email_subject, $email_message, $headers);
header("Refresh: 3; http://www.abc.com/Contact.html");
?>
<!-- include your own success html here -->
Thank you for contacting us. We will be in touch with you very soon.<br>
<a href="http://www.abc.com/Contact.html">back to website</a>
<?php
}
?>
내가 그것을 어떻게 해결할 수 있을까? 이 코드
exit()로 헤더 함수 다음에 스크립트를 종료하려고 했습니까? ? –
은 http://en.wikipedia.org/wiki/Meta_refresh (' Najzero
@Stoyan Dimov 예, 시도하십시오. – fronthem