【发布时间】:2017-03-10 18:10:45
【问题描述】:
if ($this->register($email, $register_status))
{
$this->sendConfirmationEmail($email);
echo json_encode(array("message" => $this->error = $this->l('Your email was registered. Thank You!'),"code" => 1));
die();
}
这是我的代码,我想在执行此代码后重定向页面
【问题讨论】:
-
在
die()函数之前使用header("Location: your_page.php");!!问题在哪里 -
它显示错误 XMLHttpRequest 无法加载 (abc.)。请求的资源上不存在“Access-Control-Allow-Origin”标头。因此不允许访问 Origin ('dev1.abc.')。
-
查看这篇文章可能会有所帮助
http://stackoverflow.com/questions/20035101/no-access-control-allow-origin-header-is-present-on-the-requested-resource