下面是我的html代码....
<form enctype="multipart/form-data" action="some.php" method="POST">
<label for="file">Filename:</label>
<input type="file" name="file" id="file"><br>
<input type="submit" name="submit" value="Submit">
</form>
和我的 some.php 代码...
print_R($_FILES);
print_r($_POST);
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br>";
}
else
{
echo "Upload: " . $_POST["file"]["name"] . "<br>";
echo "Type: " . $_FILES["file"]["type"] . "<br>";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
$_POST
RESULTS IN Array ( [file] => gcc-mlion.tar [submit] => Submit )
BUT$_FILES
给出空结果。