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