Created
September 11, 2017 16:52
-
-
Save anonymous/c7017ba346488eb3163fc2c725108fac to your computer and use it in GitHub Desktop.
This file contains 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 | |
require_once("class/Upload.php"); | |
// WAIT FOR FORM TO BE SUBMITED | |
if (isset($_FILES['file'])) { | |
$allowedFile = array("jpg","png"); | |
// call the Upload class and upload file | |
$upload = new Upload($_FILES['file'],"images/",1000000,$allowedFile); | |
// show results | |
$result = $upload->GetResult(); | |
print "<pre>"; | |
print_r($result); | |
print "</pre>"; | |
} | |
?> | |
<form action="index.php" method="post" enctype="multipart/form-data"> | |
<input type="file" name="file"> | |
<input type="submit"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment