oui l'image existe car quand je fais
$pdf->Image('../photo/ABENZOAR_FOULE.jpg',100,50,41,53,'jpg');
j'ai l'image qui s'affiche.
quand je lance mon fichier realpath.php (qui est la racine) et qui contient ça->
<? echo realpath('./photo/'.$data['photo']); ?>
j'ai ça en retour ->
/home/fordprob/www/trombi/photo
donc c'est bien le dossier qui contient mes photos
du coup, je mets ce code ->
$pdf->Image('./photo/'.$data['photo'],100,50,41,53,'jpg');
mais je me retrouve toujours avec cette erreur ->
Warning: getimagesize(./photo/AGEORGES_FABIEN.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /home/fordprob/www/trombi/pdf/fpdf.php on line 1498
FPDF error: Missing or incorrect image file: ./photo/AGEORGES_FABIEN.jpg
et hop, ça me ramène toujours à la même ligne ->
$a=GetImageSize($file);
et le code correspondant est ->
function _parsejpg($file)
{
//Extract info from a JPEG file
$a=GetImageSize($file);
if(!$a)
$this->Error('Missing or incorrect image file: '.$file);
if($a[2]!=2)
$this->Error('Not a JPEG file: '.$file);
if(!isset($a['channels']) || $a['channels']==3)
$colspace='DeviceRGB';
elseif($a['channels']==4)
$colspace='DeviceCMYK';
else
$colspace='DeviceGray';
$bpc=isset($a['bits']) ? $a['bits'] : 8;
//Read whole file
$f=fopen($file,'rb');
$data='';
while(!feof($f))
$data.=fread($f,4096);
fclose($f);
return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);
}
c'est a ne plus rien y comprendre