Skip to content

Instantly share code, notes, and snippets.

@med-amin
Created January 18, 2019 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save med-amin/baded795fde4bca7e1e6c397d4d6abd8 to your computer and use it in GitHub Desktop.
Save med-amin/baded795fde4bca7e1e6c397d4d6abd8 to your computer and use it in GitHub Desktop.
<form action="" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" name="btn_submit" value="Upload File" />
<?php
if(ISSET($_POST['btn_submit'])){
$file = fopen($_FILES['file']['tmp_name'], 'r+');
while (($column = fgetcsv($file, 10000, ";")) !== FALSE) {
print_r($column);die();
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment