ok a posto.

codice:
<?php
$tmp_dir = "c:\\tmp\\uploades";

$file_uploaded = $_FILES['img']['tmp_name'];
$real_name = $_FILES['img']['name'];
 
   $dir = opendir("./img/");
	 while($file = readdir($dir)){
	  if($file == $real_name){
		 $img = 1;
		}
  }
	
	if($img != 1) {
  	if(is_uploaded_file($file_uploaded)){
  	 $path = ".\\img\\$real_name";
		 move_uploaded_file($file_uploaded,$path);
		} 
	}
?>