Fungsi: Memindahkan file yang diupload ke lokasi baru
Sintaks:
move_uploaded_file ( string $filename , string $destination )Contoh :
Upload multiple file
<?php $uploads_dir = '/uploads'; foreach ($_FILES["pictures"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["pictures"]["tmp_name"][$key]; $name = $_FILES["pictures"]["name"][$key]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); } } ?>
No comments :
Post a Comment
Silahkan berkomentar dengan baik dan sopan, komentar anda berharga bagi saya...oke browww