Bonjour,
Je ne sais pas si c'est un problème php ou html mais vu que mon script est en php je me risque
voila..
mon code détermine le chemin d'une image que j'affiche dans un tableau. Si l'image n'existe pas alors elle en met un autre
le probleme est que si le fichier existe, mon script met l'image à
gauche, mais si le chemin est pas bon, il met l'image de remplacement a
droite.
CODE
$filename=$imgpath.$mkcode.".bmp";
if (file_exists($filename)) {
$resultimg = "<a href=\"#\"><img src=\"$filename\" border=0><br>test de text</a>";
} else {
$filename = "images/noimg.bmp";
$resultimg = "<a
href=\"rapport.php?errorid=01&error=$mkcode\"><img
src=\"images/noimg.bmp\" border=0>existe</a>";
};
echo "<Table>
<tr>
<td witdh=\"80%\"><br><br>
<table align=\"center\">
<tr>
<th>ID</th>
<th>CODE</th>
<th>LONGUEUR</th>
<th>NOMBRE</th>
<th>Total</th>
</tr>";
// ici le code insert des ligne de tableau avec des valeur mysql
echo " <tr>
<td></td>
<td></td>
<td></td>
<td>Total en
stock</td>
<td>",$total," m</td>
</tr>
</table>
</td>
<td align=\"center\" width=\"15%\">",$resultimg,"</td>
</tr>
<tr>
<td></td>
<td><br><center><A
HREF=\"doc/mkprofile.pdf#page=4\">print</a></center></td>
</tr>
</table>";
Voici 2 screenshots
Bon
[IMG]http://i226.photobucket.com/albums/dd255/moritus/bon.jpg[/IMG]
Mauvais
[IMG]http://i226.photobucket.com/albums/dd255/moritus/mauvais.jpg[/IMG]
Merci pour votre aide