fork download
  1. <?php
  2. if ((($_FILES["file"]["type"] == "image/gif")
  3. || ($_FILES["file"]["type"] == "image/jpeg")
  4. || ($_FILES["file"]["type"] == "image/pjpeg"))
  5. && ($_FILES["file"]["size"] < 20000))
  6. {
  7. if ($_FILES["file"]["error"] > 0)
  8. {
  9. echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
  10. }
  11. else
  12. {
  13. echo "Upload: " . $_FILES["file"]["name"] . "<br />";
  14. echo "Type: " . $_FILES["file"]["type"] . "<br />";
  15. echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
  16. echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
  17.  
  18. if (file_exists("upload/" . $_FILES["file"]["name"]))
  19. {
  20. echo $_FILES["file"]["name"] . " already exists. ";
  21. }
  22. else
  23. {
  24. move_uploaded_file($_FILES["file"]["tmp_name"],
  25. "upload/" . $_FILES["file"]["name"]);
  26. echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
  27. }
  28. }
  29. }
  30. else
  31. {
  32. echo "Invalid file";
  33. }
  34. ?>
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:1:0: parse error on input `<?'
stdout
Standard output is empty