fdpf远程映像不工作


fdpf remote images not working

朋友们,我正在使用FPDF PHP库生成PDF。但是当我使用图像方法和图像源作为远程图像时,它不会显示任何内容。我做错了什么请帮帮我。。例如

 <?
 $this->pdf->Image('http://all-pic.com/wp-content/uploads/fefad025f1bc8db580dcc7ce7a4b2f07.jpg',$this->pdf->GetX(),$this->pdf->GetY(),50,50);
?>


然而,运行良好

<?
 $this->pdf->Image('localimage.jpg',$this->pdf->GetX(),$this->pdf->GetY(),50,50);
?>

我在php设置中安装了allowurl打开。

将远程映像复制到服务器,然后在FPDF:中使用本地映像

<?php
copy('http://example.com/remoteimage.jpg', '/tmp/localimage.jpg');
$this->pdf->Image('/tmp/localimage.jpg',$this->pdf->GetX(),$this->pdf->GetY(),50,50);
?>