我正在尝试使用MPDF,但在加载时我收到以下错误,有人知道原因吗?https://github.com/mpdf/mpdf
我的代码
<?php
require_once APPPATH.'/third_party/mpdf/src/Mpdf.php';
$mpdf = new mPDF('c','A4');
$mpdf->writeHTML('<div>HELLO WORLD</div>');
$mpf->Output('new.pdf','I');
?>
答案 0 :(得分:0)
require_once APPPATH.'/third_party/mpdf7/vendor/autoload.php';
return new \Mpdf\Mpdf();
参考:https://mpdf.github.io/installation-setup/installation-v7-x.html