This:
<?php
$content = "
<page>
<h1>Exemple d'utilisation</h1>
<br>
Ceci est un <b>exemple d'utilisation</b>
de <a href='
http://html2pdf.fr/'>HTML2PDF</a>.<br>
</page>";
require_once(dirname(__FILE__).'/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML($content);
$html2pdf->Output('exemple.pdf');
?>
Work correctly but this:
<?php
$content = "
mysql_connect('localhost','test','test1');
mysql_select_db('scieki');
$result = mysql_query('select * from kody');
while ($row = mysql_fetch_assoc($result)) {
$row['kod_odp'];
}
mysql_free_result($result);
";
require_once(dirname(__FILE__).'/html2pdf.class.php');
$html2pdf = new HTML2PDF('P','A4','fr');
$html2pdf->WriteHTML($content);
$html2pdf->Output('exemple.pdf');
?>
Not! I have error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\pdf\test.php on line 7