Ora funziona!!sostituendo $nome = $_FILES['miofile']['name']; è andato tutto bene!!
grazie mille!!!!!!