小编Owl*_*Owl的帖子

调用未定义的函数 Mpdf\mb_regex_encoding()

我想用 yii2 Mpdf 做一些报告,但是当我运行程序时,我收到了一个错误,如 Call to undefined function Mpdf\mb_regex_encoding() 请告诉我如何解决这个程序

这是我的控制器

public function actionRpt($id)
{   
    $content = $this->renderPartial('rpt', [
            'model' => $this->findModel($id),
        ]);

    // setup kartik\mpdf\Pdf component
    $pdf = new Pdf([
        // set to use core fonts only
        'mode' => Pdf::MODE_UTF8, 
        // A4 paper format
        'format' => Pdf::FORMAT_A4, 
        // portrait orientation
        'orientation' => Pdf::ORIENT_PORTRAIT, 
        // stream to browser inline
        'destination' => Pdf::DEST_BROWSER, 
        // your html content input
        'content' => $content,  
        // format content from your own css file if needed …
Run Code Online (Sandbox Code Playgroud)

php mpdf yii2-advanced-app

5
推荐指数
1
解决办法
6543
查看次数

标签 统计

mpdf ×1

php ×1

yii2-advanced-app ×1