Initial commit Change-Id: I0000000000000000000000000000000000000000
This commit is contained in:
27
upload_file.php
Executable file
27
upload_file.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
require_once('classes/conf.php');
|
||||
include("classes/header.php");
|
||||
|
||||
if ($_FILES["file"]["type"] == 'text/plain'){
|
||||
|
||||
if ($_FILES["file"]["error"] > 0)
|
||||
{
|
||||
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
|
||||
echo "Type: " . $_FILES["file"]["type"] . "<br />";
|
||||
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
|
||||
move_uploaded_file($_FILES["file"]["tmp_name"],
|
||||
MAP_LOCATION . $_FILES["file"]["name"]);
|
||||
rename(MAP_LOCATION . $_FILES["file"]["name"], MAP_LOCATION . strip_tags($_POST["package"]) . strip_tags($_POST["build"]));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Invalid file";
|
||||
}
|
||||
include("classes/footer.php");
|
||||
?>
|
||||
Reference in New Issue
Block a user