php : $_FILES

Oleh : Abah Razi

بسم الله الرحمن الرحيم

$_FILES adalah suatu array asosiatif dari item-item yang diupload ke script yang ada lewat metode HTTP POST

Contoh kodenya tampak seperti berikut :


<?php
if ($_FILES["file"]["error"] > 0) {
  echo "Error: " . $_FILES["file"]["error"] . "<br>";
} else {
  echo "Upload: " . $_FILES["file"]["name"] . "<br>";
  echo "Type: " . $_FILES["file"]["type"] . "<br>";
  echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
  echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?>

About Reza Ervani
Adalah pendiri programming.rezaervani.com -

About Reza Ervani 381 Articles
Adalah pendiri programming.rezaervani.com -

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.