mime type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello


is this code OK???

"fotos" is an array of uploaded files (images)..

i want to process them in case they are images...if not, don't process..

is myme type case sensitive??

some of our customers, have problems uploading images...

thanks in advance..




     $tipo = $HTTP_POST_FILES["fotos"]["type"][$a];
$tipo = ( strstr($tipo, '; name') ) ? str_replace(strstr($tipo, '; name'), '', $tipo) : $tipo; //some opera patch¿¿¿


     if (
              ($tipo == "image/png") ||
              ($tipo == "image/jpeg") ||
              ($tipo == "image/jpg") ||
              ($tipo == "image/bmp") ||
              ($tipo == "image/gif")ç
       )
      {
           //process.
       }
   else
       {
           //do nothing
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux