【发布时间】:2023-04-03 09:01:01
【问题描述】:
所以我有一个图像字符串,我将它插入到一个带有标题的网页中,告诉浏览器它是一个图像。
所以页面应该是这样的:
<?php
header('Content-Type: image/png');
echo $image_data;
?>
http://website.com/randomString.png用于抓取图片(使用.htaccess)
当我使用以下代码时,我收到错误FPDF error: Unsupported image type
$imagePath = file_get_contents("http://website.com/".$randomString.".png");
$pdf->Image($imagePath,159,185,27);
有谁知道我可以做些什么来摆脱这个错误?
【问题讨论】: