嘗試使用笨,以顯示TCPDF的畫面時,我有一個問題,無法獲取圖像(笨,TCPDF,PHP)的大小
這是我的PDF查看:
$base_url=base_url();
// NON-BREAKING ROWS (nobr="true")
$tbleauproduct = <<<EOD
<br /><br /><br />
<table border="1" align="center">
<tr>
<th>picture</th>
<th>Product name</th>
<th>Price</th>
<th>Quantity</th>
</tr>
<tr>
<td><img src="$base_url/assets/$picture" /></td>
<td>$name</td>
<td>$price</td>
<td>$qty</td>
</tr>
</table>
EOD;
$pdf->writeHTML($tbleauproduct, true, false, true, false, '');
和這是結果:
TCPDF ERROR: [Image] Unable to get the size of the image: http://localhost:8888/open_bay//assets/130501153059-htc-one-1024x576.jpeg
PDF不是圖像。 – Narf
可能重複的[TCPDF錯誤:無法獲取圖像的大小](http://stackoverflow.com/questions/27060947/tcpdf-error-unable-to-get-the-size-of-the-image) –
避免張貼圖像的代碼。始終將代碼作爲文本發佈。我已經替換了你的圖片。 – mickmackusa