FPDF FPDF错误:图像文件丢失或不正确

时间:2015-01-09 22:05:39

标签: php fpdf

我已经看过关于此的所有帖子,但没有人帮助过我。我已打开allow_URL_fopenallow_url_include。不去了

尝试使用添加http://的网址并执行绝对路径仍未执行。

试图只做/images

如果我包含完整路径,它将起作用。

$pdf->Image('http://vsag.actualizevps.com/process/upload/8/cdv_photo_001.jpg',null,null,55,0,'jpg');
问题是我从DB中拉出链接 当我拉它时会抛出以下错误 -

Warning: getimagesize(vsag.actualizevps.com/process/upload/8/cdv_photo_001.jpg): failed to open stream: No such file or directory in /public_html/fpdf/fpdf.php on line 1213 
FPDF error: Missing or incorrect image file: vsag.actualizevps.com/process/upload/8/cdv_photo_001.jpg

该文件确实存在 - vsag.actualizevps.com/process/upload/8/cdv_photo_001.jpg

while ($row = mysql_fetch_array($result))
{
$yn = $row['answer_2'];
$grade = $row['answer_3'];
$answer = $row['answer_1'];
$pict = $row['image_1'];
if (empty($row['image_1']))
{$image1="vsag.actualizevps.com/process/upload/camera.jpg";}
else {$image1 = "vsag.actualizevps.com/process/upload/$pict";}


//$image1 = "http://vsag.actualizevps.com/process/upload/"$row['image_1'];
//$image1 = "http://vsag.actualizevps.com/process/upload/".$imageadd;
if($yn=='' ){$yn = "N/A";}
$pdf->Cell(0,10,$row['question_text'],0,1);
$pdf->Cell(0,10,'Answer - '.$answer,0,1);
$pdf->Cell(0,10,'YES/NO - '.$yn,0,1);
$pdf->Cell(0,10,'Grade - '.$grade,0,1);
//$pdf->Image($image1,null,null,55,0,'jpg');
$pdf->Cell(0,0,$pdf->Image($image1,$xaxis,$yaxis,25,29),0,0,'L',0);
//$pdf-  >Image('http://vsag.actualizevps.com/process/upload/8/cdv_photo_001.jpg',null,null,55,0,'jpg');
//$pdf->Image('http://vsag.actualizevps.com/process/upload/8/cdv_photo_002.jpg',null,null,55,0,'jpg');
//$pdf->Image('http://vsag.actualizevps.com/process/upload/8/cdv_photo_003.jpg',null,null,55,0,'jpg');
//$pdf->Cell(0,10,$image1,1,0,1);
$pdf->Cell(0,10,'__________________________________________________________________________________________',0,1);
//$pdf->WriteHTML('<img src="http://vsag.actualizevps.com/models/site-    templates/images/vsag_header_logo.jpg">');
}
$pdf->Output();

0 个答案:

没有答案