页面重定向问题 - 页面被重定向但网址没有变化 [英] Page Redirect problem - Page is redirected but url is not changing
问题描述
我的代码:
if($ mail-> Send())
{
$ this-> session-> set_flashdata(' Smessage',' < span class =label label-info>您的请求已发送!< / span>');
header( location:$ baseurl / index.php);
}
else
{
echo 邮件程序错误:。 $ MAIL-> ERRORINFO;
$ this-> session-> set_flashdata(' Fmessage',' < span class =label label-info>无法发送消息。请联系管理员。!< / span> 跨度>);
header( location:$ baseurl / index.php);
}
从控制器发送邮件后,如果邮件发送成功,我需要重定向用户到主页
但是我面临的问题是我被重定向到查看(主页)但是网址没有改变它保持不变..我想要两个重定向和网址更改...
mail->发送())
{
My code :
< blockquote> this-> session-> set_flashdata(' Smessage',' < span class =label label-info>您的请求已发送!< / span>');
header( location:
baseurl / index.php 跨度>);
}
else
{
echo 邮件程序错误:。
if($mail->Send())
{
$this->session->set_flashdata('Smessage','<span class="label label-info">Your request has been sent!</span>');
header("location:$baseurl/index.php");
}
else
{
echo "Mailer Error: " . $mail->ErrorInfo;
$this->session->set_flashdata('Fmessage','<span class="label label-info">Message could not sent.Please contact Administrator.!</span>');
header("location:$baseurl/index.php");
}
After sending mail from controller, if mail sent successfully i need to redirect user to home page
but the problem i'm facing is i got redirected to view(home) but the url is not changing it remains unchanged.. i want both redirection and url change...mail->Send())
{
this->session->set_flashdata('Smessage','<span class="label label-info">Your request has been sent!</span>');
header("location:
baseurl/index.php"
);
}
else
{
echo "Mailer Error: " .
这篇关于页面重定向问题 - 页面被重定向但网址没有变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!