<?php
echo "<form action=$PHP_SELF method=post
enctype=multipart/form-data>";
echo "Send this file: <input name=userfile
type=file />";
echo "<input type=submit value=SendFile
name=proses />";
echo "</form>";
?>
<?php
$uploaddir = "upload/";
$uploadfile = $uploaddir .
basename($_FILES["userfile"]["name"]);
if($_SERVER["REQUEST_METHOD"]=="POST"){
if
(move_uploaded_file($_FILES["userfile"]["tmp_name"],
$uploadfile)) {
echo
"File berhasil diupload.\n";
} else {
echo
"gagal!\n";
}
}
?>
Skrip/Code PHP: Input File 2
4/
5
Oleh
Unknown