mpdf cann't load on real host at $mpdf = new \Mpdf\Mpdf();

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 5
Joined: Fri Jan 08, 2021 8:10 pm

Wed Feb 17, 2021 12:51 am

According to i upload my mpdf to my real host on internet and try to print pdf out but i got fail at code below:

I dont't know why this code $mpdf = new \Mpdf\Mpdf(); cann't work it's print out only "01"

Code: Select all

echo "0";
require_once __DIR__ . '/vendor/autoload.php';
echo "1";
$mpdf = new \Mpdf\Mpdf();
echo "2";
$mpdf->WriteHTML('Hello World');

php-forum Fan User
php-forum Fan User
Posts: 90
Joined: Mon Jun 08, 2020 2:00 am

Wed Feb 17, 2021 1:29 am

You need to turn on errors so you can see what's actually failing. The first section in my article will show you how to do that. That will point you in the right direction, or allow you to show us some more information and let us help you.
Post Reply