spa*_*mup 0 php http-redirect http-headers
我想通过电子邮件发送给我后重定向用户.
代码运行,除非我在email()
-method 之后放了一些东西(比如header()
-method).
任何提示?
function process()
{
$msg = "Form Contents: \n\n";
foreach($this->fields as $key => $field)
$msg .= "$key : $field \n";
$to = 'mymail@gmail.com';
$subject = 'thesubject';
$from = $this->fields['email'];
mail($to, $subject, $msg, "From: $from\r\nReply-To: $from\r\nReturn-Path: $from\r\n");
header('Location: thanks.html');
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6881 次 |
最近记录: |