0

我需要让代码没有错误,但这里的状态代码显示为 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.");
    }       
}

为什么会发生这种情况?

4

1 回答 1

1
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 
于 2018-09-27T10:31:52.777 回答