Reply to Allowed doesn't work

Allowed doesn't work new!
by Elias, 14 years ago
Hi There

I've been used this code:
if($_FILES) {
  include("class.upload.php");
  $handle = new upload($_FILES['image']);
  if ($handle->uploaded) {
    $handle->process($dir);
    $handle->allowed = array("image/*");
    $handle->forbidden = array("application/*","text/*");
    if ($handle->processed) {
      echo 'Imagem enviada!';
      $handle->clean();
    } else {
      echo 'error : ' . $handle->error;
    }
  }
}


But i can upload any mime type. What's the problem?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important