为什么通过控制器重定向时状态代码为 303



我需要免费获得代码错误,但这里的状态代码显示为 303,它说"查看更多"。预览和响应还显示"无法加载响应数据"。

删除重定向行后,状态代码显示为 200。

下面给出的是我的控制器功能。

public function sendmail()
{
$config = array(
// config data
);
$this->email->initialize($config);
$senderEmail = $this->input->post('senderEmail');
$senderName = $this->input->post('senderName');
$content = $this->input->post('emailcont');

if ($this->emailModel->sendmail($senderEmail, $senderName, $content)) {
$this->session->set_flashdata("email_sent","Email sent successfully.");  
redirect('AboutController');
}
else {
$this->session->set_flashdata("email_sent","Error in sending Email.");
}       
}

为什么会发生这种情况?

You should have to use the function name also .You have to provide 
AboutController's 
function name where you want to redirect .
Try :
redirect('AboutController/function_name');
But Please make sure that you are using atleast codeigniter version 3.0 

相关内容

  • 没有找到相关文章

最新更新