Lato HTML nessun errore, la stampa di $_FILES restituisce errore 0 cioè file corretto.
Lato PHP stampa a schermo " possibile attacco tramite file upload" cioè entra nell'else anziché nell'if