SHARE
TWEET

PHP upload gambar

Thelz Jan 15th, 2020 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $foto                   = $_FILES['foto'];
  2.  
  3.         if (!empty($foto) AND $foto['error'] == 0) {
  4.             $path = './media/images/';
  5.             $upload = move_uploaded_file($foto['tmp_name'], $path . $foto['name']);
  6.  
  7.             if (!$upload) {
  8.                 flash('error', "Upload file gagal");
  9.                 header('location : index.php');
  10.             }
  11.             $file = $foto['name'];
  12.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top