POST: Array
(
)

FILES: Array
(
)
Select image to upload:




END OF OUTPUT




Source Code of uploadFiles.php


<?php
echo "<pre>POST: "print_r($_POST);
echo 
"\nFILES: "print_r($_FILES);echo "</pre>";
if (isset(
$_FILES['fileToUpload'])) {
  
$file fopen($_FILES['fileToUpload']['tmp_name'],"r");
  while (
$row fgetcsv($file)) {
    
print_r($row);
  }
  
fclose($file);
}
 
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <form action="" method="post" enctype="multipart/form-data">
      Select image to upload:
      <input type="file" name="fileToUpload" id="fileToUpload">
      <input type="submit" value="Upload Image" name="submit">
    </form>
  </body>
</html>


<?php //WILL DISPLAY CODE OF THIS FILE ON THE WEBPAGE//
######################################################################
echo "<br/><br/><hr><hr>";
echo 
"<h2 style='text-align:center'>END OF OUTPUT</h2>\n";
echo 
"<hr><hr>";
echo 
"<h2><br>Source Code of ".basename((string)__FILE__) . "</h2><hr>";
show_source(__FILE__);
#######################################################################
?>