Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/05/2010, 16:00
vili86
 
Fecha de Ingreso: septiembre-2009
Mensajes: 281
Antigüedad: 14 años, 7 meses
Puntos: 0
Respuesta: Berificar si una imagen existe en una carpeta y sino una por default php?

Puedes hacerlo de esta manera a mi personalmente me resulta.
Código PHP:
Ver original
  1. if (empty($row['foto'])){
  2.          ?>
  3.           <img align= "absmiddle" border="0" style=" margin-right:10px; float:left;" src="modulos/noticias/vistas/fotos/defecto.jpg" width="80" height="80" align="left">
  4.          
  5.           <?php
  6.           } else{
  7.         ?>
  8.          <img  align="absmiddle" border="0" style=" margin-right:10px; float:left;" src="modulos/noticias/vistas/fotos/<? echo strip_tags($row['foto']) ?>" width="80" height="80" align="left">
  9.         <?php }?>