【问题标题】:How to fully redirect to another page?如何完全重定向到另一个页面?
【发布时间】:2013-07-06 16:39:57
【问题描述】:

如何完全重定向到另一个页面不使用页眉?我在联系表格中使用

$subject = "$name for $type";
$mailheader = "From: $email \r\n";
// Send email, if something goes wrong, kill programm and return error message
mail($recipient, $subject, $message, $mailheader) or die("<div class=\"alert alert-error\">Something went wrong, please try again.</div>");
// If all's well, return success page
//header("Location:http://www.test.com/success"); /* Redirect browser */
//exit();

但它不起作用,实际上浏览器只是在联系页面上但成功发送消息但没有重定向到http://www.test.com/success 页面。请帮忙谢谢。

【问题讨论】:

    标签: php redirect


    【解决方案1】:

    你可以使用JavaScript重定向

    <script>
        location = 'http://www.test.com/success';
    </script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-10-07
      • 2011-08-22
      • 1970-01-01
      • 1970-01-01
      • 2019-11-04
      • 1970-01-01
      相关资源
      最近更新 更多