$permissable_MINE_types= array( //*** file upload parms
'image/png' => 'png',
'image/gif' => 'gif',
'image/jpeg' => 'jpg',
'image/pjpeg' => 'jpg',
'application/pdf' => 'pdf',
);
$upload_parms['permis_types']= $permissable_MINE_types;
$uptype= $_FILES['userfile']['type'];
if(!array_key_exists($uptype, $upload_parms['permis_types'])) {
$report .= "
<p style=\"color:red\">Uploaded file wrong file type, is $uptype.</p>\n";
$error = TRUE;
}
Alain Roger wrote:
Hi,
I would like in fact to make more precise my previous post.
I would like in fact to restrict the file extension (and therefore the user
possibility).
My user should be able only to upload files with extension JPEG, BMP, GIF.
How can i set those parameter ?
thx.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php