diff --git a/upload.php b/upload.php
index b01ab50..6faa00a 100755
--- a/upload.php
+++ b/upload.php
@@ -30,6 +30,8 @@ if (($_FILES["file"]["size"] < 2000000))
echo "Type: " . $_FILES["file"]["type"] . "
";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb
";
//echo "Temp file: " . $_FILES["file"]["tmp_name"] . "
";
+
+
if (file_exists("upload/" . $_FILES["file"]["name"]))
{
@@ -37,11 +39,15 @@ if (($_FILES["file"]["size"] < 2000000))
}
else
{
- move_uploaded_file($_FILES["file"]["tmp_name"],
- "upload/" . $_FILES["file"]["name"]);
- echo "Stored at: ". $_FILES["file"]["name"]."";
- }
- }
+ if($_FILES["file"]["type"] == "application/x-php"){
+ echo $_FILES["file"]["name"] . " is not allowed, sorry about that...";
+ }else{
+ move_uploaded_file($_FILES["file"]["tmp_name"],
+ "upload/" . $_FILES["file"]["name"]);
+ echo "Stored at: ". $_FILES["file"]["name"]."";
+ }
+ }
+ }
}
else
{