mpdf无法使用codeigniter在服务器上运行

时间:2017-02-21 11:27:09

标签: php codeigniter mpdf

mpdf无法在服务器上运行,但另一台服务器完全正常工作。 我该怎么办?

public function get_qty_print_dataa(){ 
    $val = array();
    $id = $this->uri->segment(3);
    $val['qty_data'] = $this->common->get_qta_data('invoice','id',$id);
    $this->load->view('admin/print_qty_vieww',$val);

    $html = $this->load->view('admin/print_qty_vieww',$val,true);
    $str = "invoicee_".$val['qty_data']['invoiceno'].".pdf";
    $f_name = str_replace(' ', '', $str);
    $pdfFilePath= "public/admin/pfd_files/".$f_name;
    $this->load->library('m_pdf'); //load mPDF library
    $this->m_pdf->pdf->WriteHTML($html); //generate the PDF from the given html
    $this->m_pdf->pdf->Output($pdfFilePath, "F");  // save to folder
    $this->m_pdf->pdf->Output($f_name, "D"); //download it.
    //echo json_encode($html);         
}

0 个答案:

没有答案