任何人都可以帮助我为什么我的代码没有以PDF格式获取Marahti数据库值。
这是我的代码:
<?php
GLOBAL $html;
mb_internal_encoding("UTF-8"); header('Content-Type: text/html; charset=utf-8');
ini_set('display_errors', true);
$con=mysql_connect('localhost','root') or die('Error');
mysql_select_db('DemoMarathi');
$result = mysql_query("SET NAMES utf8")or die('error'.mysql_error());
$cmd = "select * from Demo_hindi";
$result = mysql_query($cmd);
while($row = mysql_fetch_assoc($result))
{
$html .= '<td>'.$row['DemoMarathi'].'</td><td>' . $row['DemoValues']. '</td>';
$pdf->Text(105, 73,"hi".$myrow['DemoMarathi']);
$pdf->Text(105, 73,"hi".$myrow['DemoValues']);
$pdf->Write(75,"".$myrow['DemoMarathi']);
$pdf->Write(90,"".$myrow['DemoValues']);
}
include('MPDF FULL_PACKAGE/mpdf60/mpdf.php');
$mpdf=new mPDF();
$mpdf->WriteHTML($html.$myrow['DemoMarathi']);
$mpdf->WriteHTML($html.$myrow['DemoValues']);
$mpdf->Output();
exit;
?>