Questo sito potrebbe offrire funzionalità limitate durante le operazioni di manutenzione per migliorare l'esperienza utente. Se un articolo non risolve il tuo problema e vuoi richiedere supporto, la nostra comunità di supporto è pronta ad aiutarti tramite @FirefoxSupport su Twitter e /r/firefox su Reddit.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

php file uploading using zip and rar formats

  • 3 risposte
  • 3 hanno questo problema
  • 5 visualizzazioni
  • Ultima risposta di cor-el

more options

I have a file upload in php. When uploading zip or rar format it does not support. For example

if(in_array($_FILES['attachment']['type'][$key],$mime)) { // upload process } else { // failed message }

here $mime types are provide in array format.

This string: in_array($_FILES['attachment']['type'][$key],$mime) always returns false when executing the script. Other browsers are return true ie 1.

please check it once.

I have a file upload in php. When uploading zip or rar format it does not support. For example if(in_array($_FILES['attachment']['type'][$key],$mime)) { // upload process } else { // failed message } here $mime types are provide in array format. This string: in_array($_FILES['attachment']['type'][$key],$mime) always returns false when executing the script. Other browsers are return true ie 1. please check it once.

Tutte le risposte (3)

more options
more options

I am using latest firefox version 27.0.1 when I am uploading a zip file format, firefox doesn’t recognized it is a zip format. I am also write a page to check mime type of the file the output is Browser reports type of file3.zip as: text/html.

And chrome also zip mime type recognized as “application/octet-stream” where as in case of firefox zip mime type recognized as text/html not zip mime type. That is the my problem. Can anybody is there to answer?

more options

How is this file type set in the registry (HKEY_CLASSES_ROOT\.zip) and in the MIME database key (HKEY_CLASSES_ROOT\MIME\Database\Content Type)?