Advertisement
H4nk

proses-upload.php

Apr 29th, 2013
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2. $fileName = $_FILES['picture']['name'];
  3. $fileSize = $_FILES['picture']['size'];
  4. $fileError = $_FILES['picture']['error'];
  5. if($fileSize > 0 || $fileError == 0){
  6. $move = move_uploaded_file($_FILES['picture']['tmp_name'], 'upload/'.$fileName);
  7. if($move){
  8. echo "Gambarberhalil diupload";
  9. }else{
  10. echo "Gagal mengupload Gambar";
  11. }
  12. }else{
  13. echo "Gagal mengupload Gambar: ".$fileError;
  14. }
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement