Skip to content

Instantly share code, notes, and snippets.

@rajeevs1992
Last active December 11, 2015 11:38
Show Gist options
  • Save rajeevs1992/4595010 to your computer and use it in GitHub Desktop.
Save rajeevs1992/4595010 to your computer and use it in GitHub Desktop.
<html>
<title>Upload</title>
<?php
session_start();
$target=$_POST['directory'];
if($target[strlen($target)-1]!='/')
$target=$target.'/';
$count=0;
foreach ($_FILES['file']['name'] as $filename)
{
$temp=$target;
$tmp=$_FILES['file']['tmp_name'][$count];
$count=$count + 1;
$temp=$temp.basename($filename);
move_uploaded_file($tmp,$temp)
$temp='';
$tmp='';
}
?>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment