我是PHP的新手。我的目标是使用TCPDF库将用户在表单字段中插入的数据转换为PDF。在Windows XP上它工作得很好,一切都正常,但如果我在Windows 7上尝试生成PDF,它会给出以下报告。
Notice: Undefined index: startcolumn in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19345
Notice: Undefined index: startx in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19346
Notice: Undefined index: startpage in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19349
Notice: Undefined index: startpage in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19352
Notice: Undefined index: in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19352
Notice: Undefined index: startpage in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19353
Notice: Undefined index: in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19353
Notice: Undefined index: startpage in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19385
Notice: Undefined index: startx in C:\xampp\htdocs\tcpdf\tcpdf.php on line 19605
TCPDF ERROR: Some data has already been output, can't send PDF file下面是令人不快的代码:
foreach( $_POST['mat_tit'] as $key => $_POST['mat_tit'] ) {
$mat_list_data = '
<table cellpadding="1" cellspacing="0">
<tr>
<td width="100%">'.$_POST['mat_tit'].'</td>
</tr>
</table>
<table cellpadding="2" cellspacing="2">
<tr>
<td width="13%">'.$mat_up[$key].'</td>
<td width="5%">Kč</td>
<td width="12%">'.$mat_q[$key].'</td>
<td width="5%">'.$mat_ut[$key].'</td>
<td width="5%">'.$mat_c[$key].'</td>
<td width="13%">'.$mat_isum[$key].'</td>
<td width="5%">Kč</td>
<td width="6%">'.$mat_vv[$key].'</td>
<td width="13%">'.$mat_vs[$key].'</td>
<td width="5%">Kč</td>
<td width="13%">'.$mat_itot[$key].'</td>
<th width="5%">Kč</th>
</tr>
</table>';
}
// print $mat_list_data
$pdf->writeHTML($mat_list_data, true, true, false, false, '');有没有人能帮我解决这个问题?非常感谢伙计们
发布于 2016-09-09 04:41:08
您需要删除代码中的双引号,并在表中使用单引号;
$mat_list_data = "
<table cellpadding='1' cellspacing='0'>
....
....
....
";https://stackoverflow.com/questions/21436559
复制相似问题