重定向();在codeigniter

时间:2015-10-13 13:12:58

标签: codeigniter redirect

这里我使用代码生成pdf $ mpdf->输出( 'Maintenance_Report.pdf', 'd'); $ mpdf->输出(FILE_PDF。“/ Maintenance_Report.pdf”,'F'); 之后,我附上此电子邮件发送给用户。 之后该页面未重定向到我的主页。 但当iam赞扬“$ mpdf->输出('Maintenance_Report.pdf','D');”时。然后重定向工作。

 $this->load->library('mpdf');    

         $mpdf = new  mPDF('utf-8','A4','','20',15,10,10,10,10,10);
         $mpdf->useAdobeCJK=true;
        $mpdf->SetAutoFont(AUTOFONT_ALL);
         $mpdf->ignore_invalid_utf8=true;
        $mpdf->AddPage('L');
        $mpdf->list_indent_first_level = 0;
        $mpdf->WriteHTML($PrintInst);
$mpdf->Output('Maintenance_Report.pdf','D');
        $mpdf->Output(FILE_PDF ."/Maintenance_Report.pdf",'F');
        $this->load->library('email');
        $fromemail="developer@thephinixgroup.in";
        $toemail = $this->input->post('mail');
        $subject = "Flat Maintenance Report";
        $this->load->library('email');
        $config=array(
    'charset'=>'utf-8',
    'wordwrap'=> TRUE,
    'mailtype' => 'html'
    );
        $this->email->initialize($config);
        $this->email->to($toemail);
        $this->email->from($fromemail, "Flat Management");
        $this->email->subject($subject );
        $this->email->message($content);
        $this->email->attach(FILE_PDF."/Maintenance_Report.pdf");
        $mail = $this->email->send();
        //header("Refresh:5;url=".base_url()."flat/dashboard");
        $this->session->set_flashdata('mail', 'Your mail has been sent.');
        redirect("flat/dashboard");

0 个答案:

没有答案