I am getting such error whn I try to use mPDF. mPDF error: Some data has already been output to browser, can't send PDF file
Here is the code:
<?php
include("mpdf60/mpdf.php");
$mpdf=new mPDF('c','A4','','' , 0 , 0 , 0 , 0 , 0 , 0);
$mpdf->SetDisplayMode('fullpage');
$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list
$mpdf->WriteHTML(file_get_contents('invoice.html'));
$mpdf->Output();
$to = $_POST["email"];
$subject = 'the subject';
$message = 'hello';
$headers = 'From: narehh@mail.ru' . "\r\n" .
'Reply-To: narehh@mail.ru' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
Have you ever had this problem? How to solve it? Thanks