我使用PDF
生成TCPDF
但是当您在PDF
中显示来自数据库的多个图像时,图片未显示。 print_r(html);exit;
时,图片路径调用正常但未显示。
<?php
$defect_photos =explode (',',$data['data']['defect_photo']);
$html = '<table border=1>';$link = base_url();
foreach($defect_photos as $defect_photo){
$html .= "<tr><td><img src='$link/uploads/defects/$defect_photo'></td></tr>";
}
$html .= '</table>'; $pdf->writeHTML($html, true, false, true, false, '');
?>