Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/04/2006, 00:15
Avatar de DvD AdN
DvD AdN
 
Fecha de Ingreso: mayo-2005
Ubicación: Frente al monitor
Mensajes: 610
Antigüedad: 19 años
Puntos: 0
Hola

Mira, al subir un archivo se crea un array asociativo multidimensional llamado $_FILES['nombre_de_varible'] y en él se encuentra disponible la variable $_FILES['nombre_de_varible']['type'] que contiene el MIME type del archivo que se sube, que para gif sería image/gif y para jpg image/jpeg, o eso creo, de todas formas aqui una lista de tooodos los MIME types http://www.w3schools.com/media/media_mimeref.asp

Asi que simplemente haz que se cheque que $_FILES['nombre_de_varible']['type'] sea igual a image/gif o image/jpeg

Espero haber ayudado.
Saludos
__________________
Keep f***ing learning
Ask for f***ing help.
Use f***ing spell check.
Think about all the f***ing possibilities.