Upload image php probleme!!!
Résolu/Fermé
bretonm2004
jjsteing
- Messages postés
- 319
- Date d'inscription
- vendredi 9 mai 2008
- Statut
- Membre
- Dernière intervention
- 30 août 2013
jjsteing
- Messages postés
- 1669
- Date d'inscription
- vendredi 11 mai 2007
- Statut
- Contributeur
- Dernière intervention
- 21 mai 2012
A voir également:
- Upload image php probleme!!!
- Upload d'image en php ok mais ne s'affiche ? ✓ - Forum - PHP
- Upload image en php ✓ - Forum - PHP
- [php] permission d'upload d image sur serveur ✓ - Forum - PHP
- (PHP)upload d'image et creation de minisature ✓ - Forum - PHP
- Upload d'images par formulaire php, en table ✓ - Forum - PHP
1 réponse
jjsteing
22 sept. 2010 à 20:41
- Messages postés
- 1669
- Date d'inscription
- vendredi 11 mai 2007
- Statut
- Contributeur
- Dernière intervention
- 21 mai 2012
22 sept. 2010 à 20:41
Bonsoir,
Cré une image où tu marque 'pas d image', que tu apelle par ex sansimage.jpg.
Dans la page où tu affiche l image, met se code :
if fileexist('lelienverstonimage){
<img src='lelienverstonimage'>
}else{
<img src='sansimage.jpg'>
}
Cré une image où tu marque 'pas d image', que tu apelle par ex sansimage.jpg.
Dans la page où tu affiche l image, met se code :
if fileexist('lelienverstonimage){
<img src='lelienverstonimage'>
}else{
<img src='sansimage.jpg'>
}
22 sept. 2010 à 21:07
voici le code que j ai fait
echo "<tr>
<td width='114'>
<center>
if fileexist('photos/avendrenp/".$row['image1']." '){
<a href='afficheralouer.php?id=$id' alt='Voir image en grand'>
<img src=''photos/avendrenp/".$row['image1']." ''>
</a>
}else{
<img src='images/bouton.gif'>
}
</center></td>
<td width='258' height='78'>".$row['marque']." ".$row['autres']." ".$row['modele']." ".$row['annee']." ".$row['negociable']."</td>
<td align='center' width='147'>".$row['prix']." FCFA</td>
<td align='center' width='153'>".$row['date']."</td>
</tr>";
ca me marque ca avec les photos entre les parenteses
if fileexist('photos/avendrenp/26-0.jpg '){ }else{ }
22 sept. 2010 à 22:41
voici je me suis monté un code comme ca a la place
if ($row['image1'] == NULL){ echo"<tr> <td width='75' height='78'>
<a href='afficheralouer.php?id=$id' alt='Voir image en grand'>
<img src='images/bouton.gif'>
</a>
</td>";}
else{echo " <td width='75' height='78'>
<a href='afficheralouer.php?id=$id' alt='Voir image en grand'>
<img src='photos/alouernp/".$row['image1']." ' width='75' />
</a>
</td>";}
echo "
<td width='258' height='78'>".$row['marque']." ".$row['autres']." ".$row['modele']." ".$row['annee']." ".$row['negociable']."</td>
<td align='center' width='147'>".$row['prix']." FCFA</td>
<td align='center' width='153'>".$row['date']."</td>
</tr>";
}
et ca fonctionne impec
23 sept. 2010 à 10:09