在yii 2.0中使用kartik \ mpdf \ Pdf时出现致命错误

时间:2022-10-20 20:46:27

I am getting following error online

我在网上得到以下错误

Fatal error: Class 'kartik\mpdf\Pdf' not found in /home/junaidali3/public_html/magicsalon/config/web.php on line 12

致命错误:第12行的/home/junaidali3/public_html/magicsalon/config/web.php中找不到类'kartik \ mpdf \ Pdf'

where web.php is like following:

web.php如下所示:

http://grab.by/GYjE

everything is working fine on wamp but when i try to run it online server it is giving fatal error

一切都在wamp工作正常,但当我尝试在线服务器运行它是致命的错误

1 个解决方案

#1


You must add this line to autoload_psr4.php :

您必须将此行添加到autoload_psr4.php:

'mPDF\\' => array($vendorDir . '/mpdf') 

If mpdf extension is in root of vendor folder

如果mpdf扩展名在供应商文件夹的根目录中

#1


You must add this line to autoload_psr4.php :

您必须将此行添加到autoload_psr4.php:

'mPDF\\' => array($vendorDir . '/mpdf') 

If mpdf extension is in root of vendor folder

如果mpdf扩展名在供应商文件夹的根目录中