在mb_internal_encoding()
/home/project//public_html/application/third_party/mpdf/mpdf.php on line 1519
Error
:
A PHP Error was encountered
Severity: Error
Message: Call to undefined function mb_internal_encoding()
Filename: mpdf/mpdf.php
Line Number: 1519
Backtrace:
But it is correctly working in localhost
我的控制器
public function viewpdf($key,$option) {
if($option=='1')
{
$searchdata['fetchproduct']=$this->b2bproduct_model->fetch_productdata1($key);
}
if($option=='2')
{
$searchdata['fetchproduct']=$this->b2bproduct_model->fetch_productdata2($key);
}
if($option=='3')
{
$searchdata['fetchproduct']=$this->b2bproduct_model->fetch_productdata3($key);
}
$html=$this->load->view('moderator/pdf_data', $searchdata,true);
//this the the PDF filename that user will get to download
$pdfFilePath = "shany.pdf";
//load mPDF library
$this->load->library('m_pdf');
//generate the PDF from the given html
$this->m_pdf->pdf->WriteHTML($html);
//download it.
$this->m_pdf->pdf->Output($pdfFilePath, "I");
}
答案 0 :(得分:1)
它与CI没有任何关系。 有一个名为php_mbstring的扩展名,很可能PHP没有用这个扩展名编译。
为了检查我的假设是否正确,请使用extension_loaded函数,例如
extension_loaded('mbstring');
并检查它是返回true还是false。