<?php


			$target_dir = "uploads/";
	
			$target_file = $target_dir . basename($_FILES["file"]["name"]);
	
			if (file_exists($target_file)) 
			{
				$ext = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);
				
				$heure = date("H_i");
				$date = date("d_m_Y"); 
				$infos = $heure ."-" .$date;
				
				$tab = explode('.', $_FILES["file"]["name"]);
				$nom = current($tab); 
				$nom = $nom ."_".$infos;
				$new = $nom ."." .$ext;

				move_uploaded_file($_FILES["file"]["tmp_name"],'uploads/'.$new );
				echo "Uploaded File .... :".$new;

			}
			else
			{
					
				move_uploaded_file($_FILES["file"]["tmp_name"],'uploads/'. $_FILES["file"]["name"]);
				echo "Uploaded File .... :".$_FILES["file"]["name"];
			}