if( isset( $_FILES['Datei_' . $_GET['id']] ) ) { $file = $_FILES['Datei_' . $_GET['id'] ]; $types = array( "text/xml", "application/xml", "application/octet-stream" ); if( $file['error'] == 0 & $file['size'] < 26214400 ) // kleiner als 25 MB { foreach( $types as $type ) { if( $type == $file['type'] ) { if( move_uploaded_file ( $file['tmp_name'], $_SERVER['DOCUMENT_ROOT'] . "/import/" . $file['name'] ) ) echo "1"; else echo "-1"; } } } }