Good morning, I found several examples on the internet of how to generate reports with php
and mysql
, except that in the examples everyone uses php-5 and trying to do the same with < strong> php-7.0.30 I could not give the error (HTTP ERROR 500)
.
I tried using the mPDF library (it was already difficult to find version 5.7 to download because the official website could not download.
So how to generate pdf with php 7.0.30?
This is the code I am using:
<?php
include ('pdf/mpdf.php');
$pagina =
"<html>
<body>
<h2>Relatório de Profissionais S Network</h2>
<ul>
<li>teste</li>
<li>teste</li>
<li>teste</li>
<li>teste</li>
</ul>
<h4>Fonte: http://www.snetwork.com.br</h4>
</body>
</html>
";
$arquivo = "Profissionais01.php";
$mpdf = new mPDF();
$mpdf->WriteHTML($pagina);
$mpdf->Output($arquivo, 'I');
?>
Note: I do not use any framework (laravel etc.) to develop the system.