Re: mime type
| From: | Chris | Date: | Wed, 22 Nov 2006 00:09:33 +0000 |
| Subject: | Re: mime type | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245005@lists.php.net to get a copy of this message | ||
Fernando Viadero wrote:
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 you're using php4.1 or above change that to:
$tipo = $_FILES['fotos']['type'][$a];
Read up on the "super globals":
http://www.php.net/manual/en/language.variables.predefined.php
--
Postgresql & php tutorials
http://www.designmagick.com/