I downloaded mPDF using composer on openserver. Everything works fine under php7.2 But I need to work under php5.1

In 5.1, on the line $mpdf = new \Mpdf\Mpdf();

Issues:

 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\openserver\OSPanel\domains\pdf\htmlpdf.php on line 13 Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\openserver\OSPanel\domains\pdf\htmlpdf.php on line 13 Parse error: syntax error, unexpected T_STRING in C:\openserver\OSPanel\domains\pdf\htmlpdf.php on line 13 

Can this be corrected? or how to be at all?

  • 2
    "mPDF 7 requires PHP ^ 5.6 || ~ 7.0.0 || ~ 7.1.0 || ~ 7.2.0. PHP mbstring and gd extensions have to be loaded." I don't even know what else to add here - teran
  • NameSpaces works with php version 5.3. - EatMyDust

0