Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/07/2012, 16:06
Avatar de informacionsys
informacionsys
 
Fecha de Ingreso: mayo-2011
Ubicación: Bogota D.C
Mensajes: 793
Antigüedad: 13 años, 4 meses
Puntos: 76
Respuesta: Error con validacion de imagenes al subir

hola

mmmm podrias hacerlo asi:

Código PHP:
Ver original
  1. if($imagen[1] == "jpg" || $imagen[1] == "jpeg" || $imagen[1] == "JPG" || $imagen[1] == "JPEG")
  2. {
  3.                         $creada = imagecreatefromjpeg($ruta);
  4.                         $thumb = imagecreatetruecolor(150,113);  
  5.                         $ancho = imagesx($creada);
  6.                         $alto = imagesy($creada);
  7.                         imagecopyresampled($thumb,$creada,0,0,0,0,150,113,$ancho,$alto);
  8.                         $thumb = "thumb".$imagen[1];
  9.                         imagejpeg($thumb,'galerias/'.$aleatorio.$thumb,90);
  10.                    
  11. }