Skip to content

Instantly share code, notes, and snippets.

/Index.php
Created Sep 11, 2017

Embed
What would you like to do?
<?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
You can’t perform that action at this time.